background image

JavaServer Pages Technology

<< More about Java Servlet Technology | A Simple JSP Page Example >>
<< More about Java Servlet Technology | A Simple JSP Page Example >>

JavaServer Pages Technology

JavaServer Pages Technology
JavaServer Pages (JSP) technology allows you to easily create web content that has both static
and dynamic components. JSP technology makes available all the dynamic capabilities of Java
Servlet technology but provides a more natural approach to creating static content.
The main features of JSP technology are as follows:
A language for developing JSP pages, which are text-based documents that describe how to
process a request and construct a response
An expression language for accessing server-side objects
Mechanisms for defining extensions to the JSP language
JSP technology also contains an API that is used by developers of web containers, but this API is
not covered in this tutorial.
What Is a JSP Page?
A JSP page is a text document that contains two types of text: static data, which can be expressed
in any text-based format (such as
HTML
,
SVG
,
WML
, and
XML
), and JSP elements, which
construct dynamic content.
The recommended file extension for the source file of a JSP page is .jsp. The page can be
composed of a top file that includes other files that contain either a complete JSP page or a
fragment of a JSP page. The recommended extension for the source file of a fragment of a JSP
page is .jspf.
The JSP elements in a JSP page can be expressed in two syntaxes, standard and XML, though
any given file can use only one syntax. A JSP page in XML syntax is an XML document and can
be manipulated by tools and APIs for XML documents. This chapter and Chapters
Chapter 7,
"JavaServer Pages Standard Tag Library"
through
Chapter 9, "Scripting in JSP Pages"
document
only the standard syntax. The XML syntax is covered in
Chapter 6, "JavaServer Pages
Documents."
5
C H A P T E R
5
133