CHAPTER
3
The JSP Container
This chapter provides details on the contracts between a JSP container and a JSP page.
This chapter is independent on the Scripting Language used in the JSP page. Chapter 4
provides the details specific to when the
language
directive has java as its value.
This chapter also presents the precompilation protocol (see Section 3.4).
JSP page implementation classes should use the JspFactory and PageContext classes so they
will take advantage of platform specific implementations.
3.1
The JSP Page Model
As indicated in Section 1.4, Overview of JSP Page Semantics , a JSP page is executed by a
JSP container, which is installed on a Web Server or Web enabled Application Server. The
JSP container delivers requests from a client to a JSP page and responses from the JSP page
to the client. The semantic model underlying JSP pages is that of a Servlet: a JSP page
describes how to create a
response
object from a
request
object for a given protocol, possibly
creating and/or using in the process some other objects. A JSP page may also indicate how
some events (in JSP 1.1 only
init
and
destroy
events) are to be handled.
The Protocol Seen by the Web Server
The entity that processes
request
objects creating
response
objects should behave as if it were
a Java technology based class; in this specification we will simply assume it is so. This class
must implement the Servlet protocol. It is the role of the JSP container to first locate the
appropriate instance of such a class and then to deliver requests to it according to the Servlet
protocol. As indicated elsewhere, a JSP container may need to create such a class
dynamically from the JSP page source before delivering a request and response objects to it.
The JSP Container
72
JSP Web Hosting JavaServer Pages Specifications JSP Hosting
|
|
|
|
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved. |