CHAPTER
2
Standard Syntax and Semantics
This chapter describes the core syntax and semantics of the JavaServer Pages (JSP) 1.1
Specification, including the standard actions.
2.1
General Syntax Rules
The following general syntax rules apply to all elements in JSP pages.
2.1.1
Elements and Template Data
A JSP page has some
elements
and some
template data
. The elements are instances of some
element types
that are known to the JSP container;
template data
is everything else: i.e.
anything that the JSP container does not understand.
The type of an element describes its syntax and its semantics. If the element has attributes,
the type also describes the attribute names, their valid types, and their interpretation. If the
element defines objects, the semantics includes what objects it defines and their types.
There are three types of elements:
directive elements, scripting elements
, and
action
elements
; the corresponding syntax is described below. Template data is uninterpreted; it is
usually passed through to the client, or to some processing component.
2.1.2
Element Syntax
Most of the JSP syntax is based on XML. Elements based on the XML syntax have either a
start tag (including the element name) possibly with attributes, an optional body, and a
matching end tag, or they have an empty tag possibly with attributes:
Standard Syntax and Semantics
34
JSP Web Hosting JavaServer Pages Specifications JSP Hosting
|
|
|
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved. |