Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.jasper.servlet
Class JspServletWrapper  view JspServletWrapper download JspServletWrapper.java

java.lang.Object
  extended byorg.apache.jasper.servlet.JspServletWrapper

public class JspServletWrapper
extends java.lang.Object

fgiust: patched in order to let RuntimeException slip through without being hidden in ServletException's during HttpUnit tests.

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.


Field Summary
private  long available
           
private  org.apache.jasper.JasperException compileException
           
private  javax.servlet.ServletConfig config
           
private  org.apache.jasper.JspCompilationContext ctxt
           
private  boolean firstTime
           
private  boolean isTagFile
           
private  java.lang.String jspUri
           
private  long lastModificationTest
           
private  org.apache.commons.logging.Log log
           
private  org.apache.jasper.Options options
           
private  boolean reload
           
private  java.lang.Class servletClass
           
private  long servletClassLastModifiedTime
           
private  java.lang.Class tagHandlerClass
           
private  javax.servlet.Servlet theServlet
           
private  int tripCount
           
 
Constructor Summary
(package private) JspServletWrapper(javax.servlet.ServletConfig config, org.apache.jasper.Options options, java.lang.String jspUri, boolean isErrorPage, org.apache.jasper.compiler.JspRuntimeContext rctxt)
           
  JspServletWrapper(javax.servlet.ServletContext servletContext, org.apache.jasper.Options options, java.lang.String tagFilePath, javax.servlet.jsp.tagext.TagInfo tagInfo, org.apache.jasper.compiler.JspRuntimeContext rctxt, java.net.URL tagFileJarUrl)
           
 
Method Summary
 int decTripCount()
           
 void destroy()
           
 java.util.List getDependants()
          Get a list of files that the current page has source dependency on.
 org.apache.jasper.JspCompilationContext getJspEngineContext()
           
 long getLastModificationTest()
           
 javax.servlet.Servlet getServlet()
           
 javax.servlet.ServletContext getServletContext()
           
 int incTripCount()
           
 boolean isTagFile()
           
 java.lang.Class loadTagFile()
          Compile (if needed) and load a tag file
 java.lang.Class loadTagFilePrototype()
          Compile and load a prototype for the Tag file.
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean precompile)
           
 void setCompilationException(org.apache.jasper.JasperException je)
          Sets the compilation exception for this JspServletWrapper.
 void setLastModificationTest(long lastModificationTest)
           
 void setReload(boolean reload)
           
 void setServletClassLastModifiedTime(long lastModified)
          Sets the last-modified time of the servlet class file associated with this JspServletWrapper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private org.apache.commons.logging.Log log

theServlet

private javax.servlet.Servlet theServlet

jspUri

private java.lang.String jspUri

servletClass

private java.lang.Class servletClass

tagHandlerClass

private java.lang.Class tagHandlerClass

ctxt

private org.apache.jasper.JspCompilationContext ctxt

available

private long available

config

private javax.servlet.ServletConfig config

options

private org.apache.jasper.Options options

firstTime

private boolean firstTime

reload

private boolean reload

isTagFile

private boolean isTagFile

tripCount

private int tripCount

compileException

private org.apache.jasper.JasperException compileException

servletClassLastModifiedTime

private long servletClassLastModifiedTime

lastModificationTest

private long lastModificationTest
Constructor Detail

JspServletWrapper

JspServletWrapper(javax.servlet.ServletConfig config,
                  org.apache.jasper.Options options,
                  java.lang.String jspUri,
                  boolean isErrorPage,
                  org.apache.jasper.compiler.JspRuntimeContext rctxt)
            throws org.apache.jasper.JasperException

JspServletWrapper

public JspServletWrapper(javax.servlet.ServletContext servletContext,
                         org.apache.jasper.Options options,
                         java.lang.String tagFilePath,
                         javax.servlet.jsp.tagext.TagInfo tagInfo,
                         org.apache.jasper.compiler.JspRuntimeContext rctxt,
                         java.net.URL tagFileJarUrl)
                  throws org.apache.jasper.JasperException
Method Detail

getJspEngineContext

public org.apache.jasper.JspCompilationContext getJspEngineContext()

setReload

public void setReload(boolean reload)

getServlet

public javax.servlet.Servlet getServlet()
                                 throws javax.servlet.ServletException,
                                        java.io.IOException,
                                        java.io.FileNotFoundException

getServletContext

public javax.servlet.ServletContext getServletContext()

setCompilationException

public void setCompilationException(org.apache.jasper.JasperException je)
Sets the compilation exception for this JspServletWrapper.


setServletClassLastModifiedTime

public void setServletClassLastModifiedTime(long lastModified)
Sets the last-modified time of the servlet class file associated with this JspServletWrapper.


loadTagFile

public java.lang.Class loadTagFile()
                            throws org.apache.jasper.JasperException
Compile (if needed) and load a tag file


loadTagFilePrototype

public java.lang.Class loadTagFilePrototype()
                                     throws org.apache.jasper.JasperException
Compile and load a prototype for the Tag file. This is needed when compiling tag files with circular dependencies. A prototpe (skeleton) with no dependencies on other other tag files is generated and compiled.


getDependants

public java.util.List getDependants()
Get a list of files that the current page has source dependency on.


isTagFile

public boolean isTagFile()

incTripCount

public int incTripCount()

decTripCount

public int decTripCount()

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response,
                    boolean precompile)
             throws javax.servlet.ServletException,
                    java.io.IOException,
                    java.io.FileNotFoundException

destroy

public void destroy()

getLastModificationTest

public long getLastModificationTest()

setLastModificationTest

public void setLastModificationTest(long lastModificationTest)