<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">JSP directives provide directions and instructions to the container, telling it how to handle certain aspects of JSP processing.<br />
Directives in JSPs are instruction from JSPs to JSP Engine. Directives are classified in 3 categories:</p>
<p> <b>1. <a href="https://dineshonjava.com/2013/09/jsp-page-directive.html">Page Directives</a>.</b><br />
<b>2. <a href="https://dineshonjava.com/2013/09/taglib-directive-in-jsp.html#.Uir85T_pyxg">Taglib Directives</a>.</b><br />
<b>3. <a href="https://dineshonjava.com/2013/09/jsp-include-directive.html">Include Directives</a>.</b></p>
<p> <b>Directive  ;  ;  ;  ;  ;  ;  ;  ; Description</b><br />
<b><;%@ page &#8230; %>;</b>  ;  ; Defines page-dependent attributes, such as scripting language, error page, and ; ; ; buffering requirements.<br />
<b><;%@ include &#8230; %>;</b> ; ; ; Includes a file during the translation phase.<br />
<b><;%@ taglib &#8230; %>; ; ; ; ; ; </b>Declares a tag library, containing custom actions, used in the page</p>
<p> <a href="https://dineshonjava.com/2013/09/jsp-page-directive.html"><b>The page Directive:</b></a><br />
The page directive is used to provide instructions to the container that pertain to the current JSP page. You may code page directives anywhere in your JSP page. By convention, page directives are coded at the top of the JSP page.</p>
<p> ;Following is the basic syntax of page directive:</p>
<pre class="highlight" name="code"><;%@ page attribute="value" %>;
</pre>
<p>You can write XML equivalent of the above syntax as follows:</p>
<pre class="highlight" name="code"><;jsp:directive.page attribute="value" />;
</pre>
<p>
<b><a href="https://dineshonjava.com/2013/09/jsp-page-directive.html">Click here for more details about page directive.</a></b></p>
<p><b><a href="https://dineshonjava.com/2013/09/jsp-include-directive.html">The include Directive</a>:</b><br />
The include directive is used to includes a file during the translation phase. This directive tells the container to merge the content of other external files with the current JSP during the translation phase. You may code include directives anywhere in your JSP page.</p>
<p> The general usage form of this directive is as follows:</p>
<pre class="highlight" name="code"><;%@ include file="relative url" >;
</pre>
<p>The filename in the include directive is actually a relative URL. If you just specify a filename with no associated path, the JSP compiler assumes that the file is in the same directory as your JSP.</p>
<p> You can write XML equivalent of the above syntax as follows:</p>
<pre class="highlight" name="code"><;jsp:directive.include file="relative url" />;
</pre>
<p><b><a href="https://dineshonjava.com/2013/09/jsp-include-directive.html">click here for more detail about include directive.</a></b></p>
<p><b><a href="https://dineshonjava.com/2013/09/taglib-directive-in-jsp.html">The taglib Directive</a>:</b><br />
The JavaServer Pages API allows you to define custom JSP tags that look like HTML or XML tags and a tag library is a set of user-defined tags that implement custom behavior.</p>
<p> The taglib directive declares that your JSP page uses a set of custom tags, identifies the location of the library, and provides a means for identifying the custom tags in your JSP page.</p>
<p> The taglib directive follows the following syntax:</p>
<pre class="highlight" name="code"><;%@ taglib uri="uri" prefix="prefixOfTag" >;
</pre>
<p>Where the uri attribute value resolves to a location the container understands and the prefix attribute informs a container what bits of markup are custom actions.</p>
<p> You can write XML equivalent of the above syntax as follows:</p>
<pre class="highlight" name="code"><;jsp:directive.taglib uri="uri" prefix="prefixOfTag" />;
</pre>
</div>
<p>
<b><a href="https://dineshonjava.com/2013/09/taglib-directive-in-jsp.html">Click here for more detail about taglib directive.</a></b></p>
<p></p>
<div style="background-color: pink; border-width: thin; text-align: center;"><b><;<;<a href="https://dineshonjava.com/2013/09/jsp-scripting-elements.html">Previous</a> <;<; ; ; || <a href="https://dineshonjava.com/2013/08/jsp-tutorial-baby-step-to-server-pages.html">Index </a>||  ; >;>;<a href="https://dineshonjava.com/2013/09/jsp-page-directive.html">Next</a> >;>;</b></div>
</div>
<div class="wp-post-navigation"> 
									 <div class="wp-post-navigation-pre"> 
									 <a href="https://dineshonjava.com/jsp-scripting-elements/">Previous</a> 
									 </div> 
									 <div class="wp-post-navigation-next"> 
									 <a href="https://dineshonjava.com/jsp-page-directive/">Next</a> 
									 </div> 
									</div>
<script type="text/javascript">
jQuery(document).ready(function($) {
 $.post('https://dineshonjava.com/wp-admin/admin-ajax.php', {action: 'mts_view_count', id: '346'});
});
</script>
Strategy Design Patterns We can easily create a strategy design pattern using lambda. To implement…
Decorator Pattern A decorator pattern allows a user to add new functionality to an existing…
Delegating pattern In software engineering, the delegation pattern is an object-oriented design pattern that allows…
Technology has emerged a lot in the last decade, and now we have artificial intelligence;…
Managing a database is becoming increasingly complex now due to the vast amount of data…
Overview In this article, we will explore Spring Scheduler how we could use it by…