Class JspServletWrapper
java.lang.Object
org.apache.jasper.servlet.JspServletWrapper
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
FieldsModifier and TypeFieldDescriptionprivate longprivate JasperExceptionprivate javax.servlet.ServletConfigprivate JspCompilationContextprivate booleanprivate booleanprivate Fileprivate JspProbeEmitterprivate Stringprivate longprivate static Loggerprivate Optionsprivate booleanprivate Classprivate longprivate Classprivate javax.servlet.Servletprivate int -
Constructor Summary
ConstructorsConstructorDescriptionJspServletWrapper(javax.servlet.ServletConfig config, Options options, String jspUri, boolean isErrorPage, JspRuntimeContext rctxt) JspServletWrapper(javax.servlet.ServletContext servletContext, Options options, String tagFilePath, javax.servlet.jsp.tagext.TagInfo tagInfo, JspRuntimeContext rctxt, URL tagFileJarUrl) -
Method Summary
Modifier and TypeMethodDescriptionintvoiddestroy()Get a list of files that the current page has source dependency on.longjavax.servlet.ServletlongGets the last-modified time of the servlet class file associated with this JspServletWrapper.javax.servlet.ServletContextintbooleanprivate voidjspFileNotFound(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Compile (if needed) and load a tag fileCompile and load a prototype for the Tag file.voidservice(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean precompile) voidSets the compilation exception for this JspServletWrapper.voidsetLastModificationTest(long lastModificationTest) voidsetReload(boolean reload) voidsetServletClassLastModifiedTime(long lastModified) Sets the last-modified time of the servlet class file associated with this JspServletWrapper.
-
Field Details
-
log
-
theServlet
private javax.servlet.Servlet theServlet -
jspUri
-
servletClass
-
tagHandlerClass
-
ctxt
-
available
private long available -
config
private javax.servlet.ServletConfig config -
options
-
firstTime
private boolean firstTime -
reload
private boolean reload -
isTagFile
private boolean isTagFile -
tripCount
private int tripCount -
compileException
-
jspProbeEmitter
-
servletClassLastModifiedTime
private long servletClassLastModifiedTime -
jspFile
-
lastModificationTest
private long lastModificationTest
-
-
Constructor Details
-
JspServletWrapper
JspServletWrapper(javax.servlet.ServletConfig config, Options options, String jspUri, boolean isErrorPage, JspRuntimeContext rctxt) throws JasperException - Throws:
JasperException
-
JspServletWrapper
public JspServletWrapper(javax.servlet.ServletContext servletContext, Options options, String tagFilePath, javax.servlet.jsp.tagext.TagInfo tagInfo, JspRuntimeContext rctxt, URL tagFileJarUrl) throws JasperException - Throws:
JasperException
-
-
Method Details
-
getJspEngineContext
-
setReload
public void setReload(boolean reload) -
getServlet
public javax.servlet.Servlet getServlet() throws javax.servlet.ServletException, IOException, ClassNotFoundException- Throws:
javax.servlet.ServletExceptionIOExceptionClassNotFoundException
-
getServletContext
public javax.servlet.ServletContext getServletContext() -
setCompilationException
Sets the compilation exception for this JspServletWrapper.- Parameters:
je- The compilation exception
-
setServletClassLastModifiedTime
public void setServletClassLastModifiedTime(long lastModified) Sets the last-modified time of the servlet class file associated with this JspServletWrapper.- Parameters:
lastModified- Last-modified time of servlet class
-
getServletClassLastModifiedTime
public long getServletClassLastModifiedTime()Gets the last-modified time of the servlet class file associated with this JspServletWrapper.- Returns:
- Last-modified time of servlet class
-
loadTagFile
Compile (if needed) and load a tag file- Throws:
JasperException
-
loadTagFilePrototype
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.- Throws:
JasperException
-
getDependants
-
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, IOException - Throws:
javax.servlet.ServletExceptionIOException
-
destroy
public void destroy() -
getLastModificationTest
public long getLastModificationTest()- Returns:
- Returns the lastModificationTest.
-
setLastModificationTest
public void setLastModificationTest(long lastModificationTest) - Parameters:
lastModificationTest- The lastModificationTest to set.
-
getJspFile
-
jspFileNotFound
private void jspFileNotFound(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Throws:
javax.servlet.ServletExceptionIOException
-