What are JSP Directives?

Answer Posted / anurag

Define JSP directives.

-The page directive
-The include directive
-The taglib directive
Page directive:

The page directive allows to apply different attributes that
is to be added to a JSP. These attributes gives special
processing information to the JSP engine which allows the
way of processing JSP pages. The following are the various
page directives that are used in JSP

language
extends
import
session
buffer
autoFlush
isThreadSafe
info
errorPage
IsErrorPage
contentType

The syntax of any page directive is : <% @page optional
parameters …..> , where optional parameters can be any one
of the above directives.

Include directive:

The include directive is used to insert a static file which
will parse the JSP elements. The syntax is : <% @include
file = jsp file %>

Ex:

<% @include file=login.jsp %>

The included file can be a static file such as HTML or a
dynamic page such as JSP file. If the file is a JSP page ,
the JSP elements are parsed and their results are included
in the current JSP page.

Tag Libraries:

JSP technology supports the development of reusable
components called custom actions. A custom action is invoked
by the custom tag. A tab library is a set of custom tags.
Examples are form processing, accessing databases and other
enterprise services such as email , flow controls etc. JSP
tag libraries are used be web developers who are focused on
presenting issues.

The following are the some of the features of JSP custom tags:

The custom tags can be customized through the passing
the attributes from the calling page.
They can be accessed by all the available objects of JSP
page.
The response of the generated page can be modified by
custom tags by calling the page.
They can create and initialize a java bean component in
order to communicate each other.
Complex interaction can be done with JSP page by nesting
the custom tags..

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between include directive and include action in jsp?

516


What is jsp net?

514


How to send data from one page to another in jsp?

490


What are the 3 tags used in jsp bean development?

535


A jsp page, include.jsp, has a instance variable "int a", now this page is statically included in another jsp page, index.jsp, which has a instance variable "int a" declared. What happens when the index.jsp page is requested by the client?

651






What is the jsp:plugin action ?

532


What is a jsp directive?

464


What is the use of requestdispatcher?

522


What are the components of jsp?

506


What is jsp usebean?

501


Why are implicit objects not available in a regular jsp page?

615


Can you explain what is jsp page life cycle?

531


How to deactivate el on jsp?

517


Give uses of object cloning?

546


What do you know about jsp tags? Explain how you understand the action tag and jsp action elements.

567