Package org.apache.jasper.servlet
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.
- Author:
- Anil K. Vijendran, Harish Prabandham, Remy Maucherat, Kin-man Chung, Glenn Nielsen, Tim Fennell
- 
Constructor SummaryConstructorsConstructorDescriptionJspServletWrapper(ServletConfig config, Options options, String jspUri, JspRuntimeContext rctxt) JspServletWrapper(ServletContext servletContext, Options options, String tagFilePath, TagInfo tagInfo, JspRuntimeContext rctxt, Jar tagJar) 
- 
Method SummaryModifier and TypeMethodDescriptionintvoiddestroy()Get a list of files that the current page has source dependency on.longlongbooleanprotected JasperExceptionAttempts to construct a JasperException that contains helpful information about what went wrong.intbooleanClass<?>Compile (if needed) and load a tag file.Class<?>Compile and load a prototype for the Tag file.voidservice(HttpServletRequest request, 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.
- 
Constructor Details- 
JspServletWrapperpublic JspServletWrapper(ServletConfig config, Options options, String jspUri, JspRuntimeContext rctxt) 
- 
JspServletWrapperpublic JspServletWrapper(ServletContext servletContext, Options options, String tagFilePath, TagInfo tagInfo, JspRuntimeContext rctxt, Jar tagJar) 
 
- 
- 
Method Details- 
getJspEngineContext
- 
setReloadpublic void setReload(boolean reload) 
- 
getReloadpublic boolean getReload()
- 
getServlet- Throws:
- ServletException
 
- 
getServletContext
- 
setCompilationExceptionSets the compilation exception for this JspServletWrapper.- Parameters:
- je- The compilation exception
 
- 
setServletClassLastModifiedTimepublic 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
 
- 
loadTagFileCompile (if needed) and load a tag file.- Returns:
- the loaded class
- Throws:
- JasperException- Error compiling or loading tag file
 
- 
loadTagFilePrototypeCompile and load a prototype for the Tag file. This is needed when compiling tag files with circular dependencies. A prototype (skeleton) with no dependencies on other other tag files is generated and compiled.- Returns:
- the loaded class
- Throws:
- JasperException- Error compiling or loading tag file
 
- 
getDependantsGet a list of files that the current page has source dependency on.- Returns:
- the map of dependent resources
 
- 
isTagFilepublic boolean isTagFile()
- 
incTripCountpublic int incTripCount()
- 
decTripCountpublic int decTripCount()
- 
getJspUri
- 
getUnloadHandle
- 
servicepublic void service(HttpServletRequest request, HttpServletResponse response, boolean precompile) throws ServletException, IOException, FileNotFoundException 
- 
destroypublic void destroy()
- 
getLastModificationTestpublic long getLastModificationTest()- Returns:
- Returns the lastModificationTest.
 
- 
setLastModificationTestpublic void setLastModificationTest(long lastModificationTest) - Parameters:
- lastModificationTest- The lastModificationTest to set.
 
- 
getLastUsageTimepublic long getLastUsageTime()- Returns:
- the lastUsageTime.
 
- 
handleJspExceptionAttempts to construct a JasperException that contains helpful information about what went wrong. Uses the JSP compiler system to translate the line number in the generated servlet that originated the exception to a line number in the JSP. Then constructs an exception containing that information, and a snippet of the JSP to help debugging. Please see https://bz.apache.org/bugzilla/show_bug.cgi?id=37062 and http://www.tfenne.com/jasper/ for more details. - Parameters:
- ex- the exception that was the cause of the problem.
- Returns:
- a JasperException with more detailed information
 
 
-