JSP Directives

There are three directives in JSP:
  1. Include Directive
  2. Page Directive
  3. Taglib Directive
Here we explain one by one:

Include Directive:
                         Include Directive is used to include one jsp or html page to another jsp page. Here we can see the syntax as:

                   <%@include file="jsp or html " %>

Here see the example:

           <% @include file="a.jsp"  %>
           <% @include file="b.jsp"  %>

Include Directive line will be replaced with content of jsp or html included at translation time.

Page Directive:
                      Here we can see the syntax of page directive as follows:

<%@page language=""
                 extends=""
                 isThreadSafe=""
                 import=""
                 session=""
                 errorPage=""
                 isErrorPage=""
                 isELIgnored=""
                                           %>
We will explain all these attributes in details in next post.

Taglib Directive:
                       Tag Directive is used to use contom tags developed in jsp.
Syntax:
<%@taglib uri="... " prefix=" ..." %>

JSP provide some standard action or buit-in-action or built-in tag are as follows:
  1. <jsp: include>
  2. <jsp: forward>
  3. <jsp: param>
  4. <jsp: userBean>
  5. <jsp: setProperty>
  6. <jsp: getProperty>
All these  tags will explain in details in next post.

0 comments :

Post a Comment