| The JavaServer Pages™ (JSP) specification is built on top of the Java™ servlet specification and is intended to provide for better separation of the presentation (e.g., HTML markup) and business logic (e.g., database operations) parts of web applications. JSP is supported by all major web and application servers. A partial listing of JSP-compliant products is available at Sun Microsystems’ JSP web page: http://java.sun.com/products/jsp/
A JSP page is a web page that contains both static content, such as HTML, and JSP elements for generating the parts that differ with each request, as shown in Figure 1. The default filename extension for a JSP page is .jsp.
Everything in the page that’s not a JSP element is called template text. Template text can be in any format, including HTML, WML, XML, and even plain text. Since HTML is by far the most common web page language in use today, most of the descriptions and examples in this text are HTMLbased. You should be aware, though, that JSP has no dependency on HTML. Template text is not interpreted at all; it’s passed straight through to the browser. JSP is therefore wellsuited to serve any markup language.
When a JSP page request is processed, the static template text and the dynamic content generated by the JSP elements are merged, and the result is sent as the response to the client. |