FIGURE 3 1 
Contracts between a JSP Page and a JSP Container. 
JSP Container
JSP Page
init event
jspInit
<%!
public void jspInit()...
request
public void jspDestroy()...
_jspService
response
%>
This is the response..
destroy event
jspDestroy
REQUEST
PROCESSING
TRANSLATION
PHASE
PHASE
The involved contracts are shown in 
FIGURE 3 1
. We now revisit this whole process in more 
detail.
3.2
JSP Page Implementation Class
The JSP container creates a JSP page implementation class for each JSP page. The name of 
the JSP page implementation class is implementation dependent.
The creation of the implementation class for a JSP page may be done solely by the JSP 
container, or it may involve a superclass provided by the JSP page author through the use of 
the 
extends
 attribute in the 
jsp
 directive. The extends mechanism is available for 
sophisticated users and it should be used with extreme care as it restricts what some of the 
decisions that a JSP container can take, e.g. to improve performance.
The JSP page implementation class will implement 
Servlet
 and the 
Servlet
 protocol 
will be used to deliver requests to the class.
Chapter 3
The JSP Container
74




JSP Web Hosting JavaServer Pages Specifications JSP Hosting




 
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.