Friday, March 27, 2015

Directives in JSP

Brief about Directives in JSP:

Directives are direction providers which also provides instructions to the container and help finding files and methods and etc. They tell how to handle a particular request and JSP processing.There are three directives and they are:


The page Directive: This directives are used to provide information to container which belongs to the present JSP page , page Directive might be coded anywhere in the page.The attributes for page directive are:


Attribute
Purpose
buffer
This specifies a buffering model for the output stream.
autoFlush
It controls the behavior of the servlet output buffer.
contentType
This defines the character encoding scheme.
errorPage
This defines the URL of another JSP that reports on Java unchecked runtime exceptions.
isErrorPage
It indicates if this JSP page is a URL specified by another JSP page's errorPage attribute.
extends
This specifies a superclass that the generated servlet must extend
import
This specifies a list of packages or classes for use in the JSP as the Java import statement does for Java classes.
info
This defines a string that can be accessed with the servlet's getServletInfo() method.
isThreadSafe
This defines the threading model for the generated servlet.
language
This defines the programming language used in the JSP page.
session
This specifies whether or not the JSP page participates in HTTP sessions
isELIgnored
This specifies whether or not EL expression within the JSP page will be ignored.
isScriptingEnabled
It determines if scripting elements are allowed for use.


The include Directive:  These Directives are used to include files during translation phase.


The taglib Directive : 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.


No comments:

Post a Comment