Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
Chapter
JSP directive affects the overall structure of the servlet that results
from the JSP page. The following templates show the two possible
A
forms for directives. Single quotes can be substituted for the double
quotes around the attribute values, but the quotation marks cannot be omit 
ted altogether. To obtain quote marks within an attribute value, precede
them with a back slash, using 
\'
 for 
'
 and 
\"
 for 
"
.
<%@ directive attribute="value" %>
<%@ directive attribute1="value1" 
              attribute2="value2"
              ...
              attributeN="valueN" %>
In JSP, there are three types of directives: 
page
, 
include
, and 
taglib
.
The 
page
 directive lets you control the structure of the servlet by importing
classes, customizing the servlet superclass, setting the content type, and the
like. A 
page
 directive can be placed anywhere within the document; its use is
the topic of this chapter. The second directive, 
include
, lets you insert a file
into the servlet class at the time the JSP file is translated into a servlet. An
include
 directive should be placed in the document at the point at which
you want the file to be inserted; it is discussed in Chapter 12 (Including Files
and Applets in JSP Documents) for inserting files into JSP pages. JSP 1.1
introduces a third directive, 
taglib
, which can be used to define custom
247






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

jsp web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved