org.apache.jasper.runtime
Class HttpJspBase

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--org.apache.jasper.runtime.HttpJspBase
All Implemented Interfaces:
HttpJspPage, JspPage, java.io.Serializable, Servlet, ServletConfig

public abstract class HttpJspBase
extends HttpServlet
implements HttpJspPage

This is the subclass of all JSP-generated servlets.

Author:
Anil K. Vijendran
See Also:
Serialized Form

Method Summary
abstract  void _jspService(HttpServletRequest request, HttpServletResponse response)
          _jspService corresponds to the body of the JSP page.
 void destroy()
          Called by the servlet container to indicate to a servlet that the servlet is being taken out of service.
 java.lang.String getServletInfo()
          Returns information about the servlet, such as author, version, and copyright.
 void init(ServletConfig config)
          Called by the servlet container to indicate to a servlet that the servlet is being placed into service.
 void jspDestroy()
          jsp_destroy() is invoked when the JspPage is about to be destroyed.
 void jspInit()
          jsp_init() is invoked when the JspPage is initialized.
 void service(HttpServletRequest request, HttpServletResponse response)
          Entry point into service.
 void setClassLoader(java.lang.ClassLoader cl)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.Servlet
getServletConfig, service
 

Method Detail

init

public final void init(ServletConfig config)
                throws ServletException
Description copied from interface: Servlet
Called by the servlet container to indicate to a servlet that the servlet is being placed into service.

The servlet container calls the init method exactly once after instantiating the servlet. The init method must complete successfully before the servlet can receive any requests.

The servlet container cannot place the servlet into service if the init method

  1. Throws a ServletException
  2. Does not return within a time period defined by the Web server
Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Following copied from interface: javax.servlet.Servlet
Parameters:
config - a ServletConfig object containing the servlet's configuration and initialization parameters
Throws:
ServletException - if an exception has occurred that interferes with the servlet's normal operation
See Also:
UnavailableException, Servlet.getServletConfig()

getServletInfo

public java.lang.String getServletInfo()
Description copied from interface: Servlet
Returns information about the servlet, such as author, version, and copyright.

The string that this method returns should be plain text and not markup of any kind (such as HTML, XML, etc.).

Specified by:
getServletInfo in interface Servlet
Overrides:
getServletInfo in class GenericServlet
Following copied from interface: javax.servlet.Servlet
Returns:
a String containing servlet information

destroy

public final void destroy()
Description copied from interface: Servlet
Called by the servlet container to indicate to a servlet that the servlet is being taken out of service. This method is only called once all threads within the servlet's service method have exited or after a timeout period has passed. After the servlet container calls this method, it will not call the service method again on this servlet.

This method gives the servlet an opportunity to clean up any resources that are being held (for example, memory, file handles, threads) and make sure that any persistent state is synchronized with the servlet's current state in memory.

Specified by:
destroy in interface Servlet
Overrides:
destroy in class GenericServlet

setClassLoader

public final void setClassLoader(java.lang.ClassLoader cl)

service

public final void service(HttpServletRequest request,
                          HttpServletResponse response)
                   throws ServletException,
                          java.io.IOException
Entry point into service.

jspInit

public void jspInit()
Description copied from interface: JspPage
jsp_init() is invoked when the JspPage is initialized. At this point getServletConfig() will return the desired value.
Specified by:
jspInit in interface JspPage

jspDestroy

public void jspDestroy()
Description copied from interface: JspPage
jsp_destroy() is invoked when the JspPage is about to be destroyed.
Specified by:
jspDestroy in interface JspPage

_jspService

public abstract void _jspService(HttpServletRequest request,
                                 HttpServletResponse response)
                          throws ServletException,
                                 java.io.IOException
Description copied from interface: HttpJspPage
_jspService corresponds to the body of the JSP page. This method is defined automatically by the JSP processor and should NEVER BE DEFINED BY THE JSP AUTHOR
Specified by:
_jspService in interface HttpJspPage


Copyright © 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.