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.

Web Applications<br />

78<br />

FIGURE 3–1 <strong>Java</strong> Web Application Request Handling<br />

Web<br />

Client<br />

1<br />

HTTP<br />

Request<br />

6<br />

HTTP<br />

Response<br />

HttpServlet<br />

Request<br />

HttpServlet<br />

Response<br />

Web Server<br />

Web<br />

Web<br />

Components Web<br />

Components<br />

Components<br />

Web<br />

Web<br />

Components <strong>Java</strong>Beans<br />

Components<br />

Components<br />

Servlets are <strong>Java</strong> programming language classes that dynamically process requests and construct<br />

responses. JSP pages are text-based documents that execute as servlets but allow a more natural<br />

approach to creating static content. Although servlets and JSP pages can be used<br />

interchangeably, each has its own strengths. Servlets are best suited for service-oriented<br />

applications (web service endpoints are implemented as servlets) and the control functions of a<br />

presentation-oriented application, such as dispatching requests and handling nontextual data.<br />

JSP pages are more appropriate for generating text-based markup such as HTML, Scalable<br />

Vector Graphics (SVG), Wireless Markup Language (WML), and XML.<br />

Since the introduction of <strong>Java</strong> Servlet and JSP technology, additional <strong>Java</strong> technologies and<br />

frameworks for building interactive web applications have been developed. Figure 3–2<br />

illustrates these technologies and their relationships.<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010<br />

2<br />

5<br />

3<br />

4<br />

4

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

Saved successfully!

Ooh no, something went wrong!