Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » jasper » servlet » [javadoc | source]
org.apache.jasper.servlet
public class: JspServlet [javadoc | source]
java.lang.Object
   javax.servlet.GenericServlet
      javax.servlet.http.HttpServlet
         org.apache.jasper.servlet.JspServlet

All Implemented Interfaces:
    org.apache.PeriodicEventListener, Serializable, Servlet, ServletConfig

The JSP engine (a.k.a Jasper). The servlet container is responsible for providing a URLClassLoader for the web application context Jasper is being used in. Jasper will try get the Tomcat ServletContext attribute for its ServletContext class loader, if that fails, it uses the parent class loader. In either case, it must be a URLClassLoader.
Method from org.apache.jasper.servlet.JspServlet Summary:
destroy,   getJspCount,   getJspReloadCount,   init,   periodicEvent,   preCompile,   service,   setJspReloadCount
Methods from javax.servlet.http.HttpServlet:
service
Methods from javax.servlet.GenericServlet:
destroy,   getInitParameter,   getInitParameterNames,   getServletConfig,   getServletContext,   getServletInfo,   getServletName,   init,   init,   log,   log,   service
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jasper.servlet.JspServlet Detail:
 public  void destroy() 
 public int getJspCount() 
    Returns the number of JSPs for which JspServletWrappers exist, i.e., the number of JSPs that have been loaded into the webapp with which this JspServlet is associated.

    This info may be used for monitoring purposes.

 public int getJspReloadCount() 
    Gets the number of JSPs that have been reloaded.

    This info may be used for monitoring purposes.

 public  void init(ServletConfig config) throws ServletException 
 public  void periodicEvent() 
 boolean preCompile(HttpServletRequest request) throws ServletException 

    Look for a precompilation request as described in Section 8.4.2 of the JSP 1.2 Specification. WARNING - we cannot use request.getParameter() for this, because that will trigger parsing all of the request parameters, and not give a servlet the opportunity to call request.setCharacterEncoding() first.

 public  void service(HttpServletRequest request,
    HttpServletResponse response) throws IOException, ServletException 
 public  void setJspReloadCount(int count) 
    Resets the JSP reload counter.