C H A PT E R
4
Scripting
This chapter describes the details of the Scripting Elements when the language directive 
value is  java . The scripting language is based on the Java programming language (as 
specified by  The Java Language Specification ), but note that there is no valid JSP page, or 
a subset of a page, that is a valid Java program.
The details of the relationship between the scripting declarations, scriptlets, and scripting 
expressions and the Java programming language is explained in detail in the following 
sections. The description is in terms of the structure of the JSP page implementation class; 
recall that a JSP container need not necessarily generate the JSP page implementation class 
but it must behave as if one existed.
4.1
Overall Structure
Some details of what makes a JSP page legal are very specific to the scripting language used 
in the page. This is especially complex since scriptlets are just language fragments, not 
complete language statements.
Valid JSP Page
A JSP page is valid for a Java Platform if and only if the JSP page implementation class 
defined by 
TABLE 4 1
 (after applying all include directives), together with any other classes 
defined by the JSP container, is a valid program for the given Java Platform. 
Sun Microsystems reserves all names of the form {_}
jsp_*
 and {_}
jspx_*
, in any 
combination of upper and lower case, for the JSP specification. Names of this form that are 
not defined in this specification are reserved by Sun for future expansion.
 Scripting
82




JSP Web Hosting JavaServer Pages Specifications JSP Hosting




 
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.