10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5 CHAPTER 5<br />

What Is a JSP Page?<br />

<strong>Java</strong>Server PagesTechnology<br />

<strong>Java</strong>Server Pages (JSP) technology allows you to easily create web content that has both static<br />

and dynamic components. JSP technology makes available all the dynamic capabilities of <strong>Java</strong><br />

Servlet technology but provides a more natural approach to creating static content.<br />

<strong>The</strong> main features of JSP technology are as follows:<br />

■ A language for developing JSP pages, which are text-based documents that describe how to<br />

process a request and construct a response<br />

■ An expression language for accessing server-side objects<br />

■ Mechanisms for defining extensions to the JSP language<br />

JSP technology also contains an API that is used by developers of web containers, but this API is<br />

not covered in this tutorial.<br />

A JSP page is a text document that contains two types of text: static data, which can be expressed<br />

in any text-based format (such as HTML, SVG, WML, and XML), and JSP elements, which<br />

construct dynamic content.<br />

<strong>The</strong> recommended file extension for the source file of a JSP page is .jsp. <strong>The</strong> page can be<br />

composed of a top file that includes other files that contain either a complete JSP page or a<br />

fragment of a JSP page. <strong>The</strong> recommended extension for the source file of a fragment of a JSP<br />

page is .jspf.<br />

<strong>The</strong> JSP elements in a JSP page can be expressed in two syntaxes, standard and XML, though<br />

any given file can use only one syntax. A JSP page in XML syntax is an XML document and can<br />

be manipulated by tools and APIs for XML documents. This chapter and Chapters Chapter 7,<br />

“<strong>Java</strong>Server Pages Standard Tag Library,” through Chapter 9, “Scripting in JSP Pages,”<br />

document only the standard syntax. <strong>The</strong> XML syntax is covered in Chapter 6, “<strong>Java</strong>Server Pages<br />

Documents.”<br />

133

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!