Home Help Java D Directive Tags
Questions:Ask|Latest

 
 

Share on Google+Share on Google+

Directive Tags

Advertisement
The directive tag provides additional information to the JSP Engine regarding the jsp page.

Directive Tags

     

The directive tag provides additional information to the JSP Engine regarding the jsp page. JSP directives change the way JSP Engine processes the page. Directive tag allows the user to import packages, define error handling pages or session information of JSP page.

JSP defines three types of directive tag.

  • page
  • include
  • taglib

page directive : page directive sets page-level preferences for the JSP. Here is the syntax for the page directive:

<%@ page optional attribute ... %>

e.g. <%@page language="java" %> 

the optional available for page directive are:

include directive : include directive allows the developer to include other JSP or static page when JSP is translated into a servlet, while the action <jsp:include> includes the resources at request time.

<%@ include optional attribute ... %>

e.g.: <%@ include file="/header.jsp" %> 

taglib directive : This directive allows the user to create their own custom tags.

<%@ taglib optional attribute ... %>

e.g.: <%@ taglib prefix="x" uri="foo" %> 

To learn more about JSP directive click on the link: 

http:/www.roseindia.net/software-tutorials/detail/6244

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: June 17, 2009

Related Tutorials

Ask Questions?    Discuss: Directive Tags  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com