public final class JspRuntimeContext extends Object
Class for tracking JSP compile time file dependencies when the <%@include file="..."%> directive is used.
A background thread periodically checks the files a JSP page is dependent upon. If a dependent file changes the JSP page which included it is recompiled.
Only used if a web application context is a directory.
| Constructor and Description |
|---|
JspRuntimeContext(javax.servlet.ServletContext context,
Options options)
Create a JspRuntimeContext for a web application context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addWrapper(String jspUri,
JspServletWrapper jsw)
Add a new JspServletWrapper.
|
void |
checkCompile()
Method used by background thread to check the JSP dependencies
registered with this class for JSP's.
|
void |
destroy()
Process a "destroy" event for this web application context.
|
String |
getClassPath() |
CodeSource |
getCodeSource()
Get the SecurityManager Policy CodeSource for this web
applicaiton context.
|
int |
getJspCount()
Returns the number of JSPs for which JspServletWrappers exist, i.e.,
the number of JSPs that have been loaded into the webapp.
|
int |
getJspReloadCount()
Gets the current value of the JSP reload counter.
|
ClassLoader |
getParentClassLoader()
Get the parent URLClassLoader.
|
PermissionCollection |
getPermissionCollection()
Get the SecurityManager PermissionCollection for this
web application context.
|
JspServletWrapper |
getWrapper(String jspUri)
Get an already existing JspServletWrapper.
|
void |
incrementJspReloadCount()
Increments the JSP reload counter.
|
void |
removeWrapper(String jspUri)
Remove a JspServletWrapper.
|
void |
setJspReloadCount(int count)
Resets the JSP reload counter.
|
public JspRuntimeContext(javax.servlet.ServletContext context,
Options options)
Create a JspRuntimeContext for a web application context.
Loads in any previously generated dependencies from file.
context - ServletContext for web applicationoptions - optionspublic void addWrapper(String jspUri, JspServletWrapper jsw)
jspUri - JSP URIjsw - Servlet wrapper for JSPpublic JspServletWrapper getWrapper(String jspUri)
jspUri - JSP URIpublic void removeWrapper(String jspUri)
jspUri - JSP URI of JspServletWrapper to removepublic int getJspCount()
public CodeSource getCodeSource()
public ClassLoader getParentClassLoader()
public PermissionCollection getPermissionCollection()
public void destroy()
public void incrementJspReloadCount()
public void setJspReloadCount(int count)
count - Value to which to reset the JSP reload counterpublic int getJspReloadCount()
public void checkCompile()
public String getClassPath()
Copyright © 2000–2021 Apache Software Foundation. All rights reserved.