Java Reference
In-Depth Information
Figure 18−3. The output of login.jsp
Ta g
Purpose
<@page . . . %>
The page directive. Every JSP page must
have one. Common attributes specify
the page language, the content type of
the output, the page buffer size, and the
list of packages to import.
<%@include file=" URL "%>
Includes the specified file at compilation
time.
<%@taglib
uri=" taglibId "prefix=" tagPrefix "%>
Declares a tag library for the page. The
uri attribute uniquely identifies the
library, and the prefix attribute speci-
fies the prefix by which it is known on
the page.
<%! . . . %>
A declaration tag. These delimiters sur-
round Java code that becomes methods
and fields of the resulting servlet class.
<%= . . . %>
An expression tag. Contains a Java
expression. The tag is replaced with the
expression value at runtime.
<% . . . %>
A scriptlet . These delimiters surround
Java code that becomes part of the
_jspService() method, which is the JSP
version of goGet() and doPost() .
You may also notice that the Java scriptlets and expressions in Example 18-4 use
several local variables that are automatically declared by the JSP system. The fol-
lowing table shows available variables:
Search WWH ::




Custom Search