What are JSP Directives?

Answers were Sorted based on User's Feedback



What are JSP Directives?..

Answer / vij

A directive is a way for you to give special instruction to
the container at page translation time.

3 flavours

page
include
taglib

Is This Answer Correct ?    30 Yes 2 No

What are JSP Directives?..

Answer / gowri

1)page directive
2)include directive
3)taglib directive

Is This Answer Correct ?    20 Yes 4 No

What are JSP Directives?..

Answer / akash srivastava

JSP directives are used to specify the attributes of
pages.Using directives we can even import some packages.So
using the directive statement we have specified the
packages that has to be imported...

Is This Answer Correct ?    11 Yes 2 No

What are JSP Directives?..

Answer / guest

A JSP directive affects the overall structure of the servlet
class. it usually has the following form:
<%@ directive attribute="value" %>
How ever , you can also combine multiple attribute settings
for a single directive, as follows:
<%@ directive attribute1="value1" attribute2="value2" --
attrubuteN="value N" %>
These are two main types of diretive:page, which lets to
do things like import classes,customize the servlet
superclass, and the like; and include,which lets to insert a
file into the servlet class at the time the JSP file is
translated into a servlet.

Is This Answer Correct ?    11 Yes 4 No

What are JSP Directives?..

Answer / naresh

there are 3 directives in JSP
1)<%page...%>
2)<%include...%>
3)<%taglib...%>

Is This Answer Correct ?    10 Yes 4 No

What are JSP Directives?..

Answer / siva kumar

jsp directives are used to avoid java code from jsp.
jsp directives are 1.page 2.include and 3.taglib.
Attributes for page direcites are
import,language,contentType,errorPage,isErrorPage,buffer,autoFlush,
session,threadSafe,extends,info,pageEncoding and isELIngnored

Attributes for include directives are
page and file

Attributes for Taglib directive are
uri,prefix and tagdir

Is This Answer Correct ?    7 Yes 3 No

What are JSP Directives?..

Answer / pradeep gupta

when jsp pages translate into the servlet when directive
provides the infomation to the jsp engine.

Is This Answer Correct ?    6 Yes 4 No

What are JSP Directives?..

Answer / 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

What are JSP Directives?..

Answer / sumana

in directives we can import the package .deffine error
handling pages or the session information of jsp page

Is This Answer Correct ?    2 Yes 12 No

Post New Answer

More JSP Interview Questions

What is a hidden comment in jsp?

0 Answers  


What is content type in jsp?

0 Answers  


Why does jcomponent have add() and remove() methods but the component does not?

0 Answers  


What are the features of jsp?

0 Answers  


What is jsp life cycle?

0 Answers  






What program opens a jsp file?

0 Answers  


List down the major differences between the jsp custom tags and java beans.

0 Answers  


What is meant by session management?

0 Answers  


Differentiate between pagecontext.include and jsp:include?

0 Answers  


In the servlet 2.4 specification singlethreadmodel has been deprecated, why?

0 Answers  


What are the different scopes an object can have in a jsp page?

0 Answers  


Can you use javascript in jsp?

0 Answers  


Categories