SYSTEM "http://java.sun.com/j2ee/dtds/web app_1_2.dtd">
 1 
C.3
The Servlet for the compiled JSP page
As an alternative, we will show how one can compile the JSP page into a Servlet class to run 
in a JSP container.
The JSP page is compiled into a Servlet with some implementation dependent name 
_jsp_HelloWorld_XXX_Impl
. The Servlet code only depends on the JSP 1.1 and 
Servlet 2.2 APIs, as follows:
imports javax.servlet.*;
imports javax.servlet.http.*;
imports javax.servlet.jsp.*;
class _jsp_HelloWorld_XXX_Impl 
extends_PlatformDependent_Jsp_Super_Impl {
public void _jspInit() {
// ...
}
public void jspDestroy() {
// ...
}
static JspFactory _factory = JspFactory.getDefaultFactory();
public void _jspService(
HttpServletRequest  request, 
HttpServletResponse response)
throws IOException, ServletException
{
Object
page
= this;
HttpSession
session
= request.getSession();
ServletConfig config
= getServletConfig();
ServletContext application = config.getServletContext();
PageContext
pageContext
= _factory.getPageContext( this,
147
JavaServer Pages 1.1 Specification  
November 30, 1999




JSP Web Hosting JavaServer Pages Specifications JSP Hosting




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