Sun Java System Web Server 6.1 SP6 Programmer's Guide to Web Applications

Introducing JSPs

JSPs are browser pages in HTML or XML. They also contain Java code, which enables them to perform complex processing, conditionalize output, and communicate with other application objects. JSPs in Sun Java System Web Server are based on the JSP 1.2 specification.

In a Sun Java System Web Server application, JSPs are the individual pages that make up an application. You can call a JSP from a servlet to handle the user interaction output. You can also use a JSP as an interaction destination as JSPs have the same application environment access as any other application component.

JSPs are made up of JSP elements and template data. Template data is anything not in the JSP specification, including text and HTML tags. For example, the minimal JSP requires no processing by the JSP engine and is a static HTML page.

The Sun Java System Web Server compiles JSPs into HTTP servlets the first time they are called (or they can be precompiled for better performance). This makes them available to the application environment as standard objects and enables them to be called from a client using a URL.

JSPs run inside the server's JSP engine, which is responsible for interpreting JSP-specific tags and performing the actions they specify in order to generate dynamic content. This content, along with any template data surrounding it, is assembled into an output page and is returned to the caller.