Class JspRuntimeContext
java.lang.Object
org.apache.sling.scripting.jsp.jasper.compiler.JspRuntimeContext
Class for tracking JSP compile time file dependencies when the
&060;%@include file="..."%&062; directive is used.
A background thread periodically checks the files a JSP page
is dependent upon. If a dpendent file changes the JSP page
which included it is recompiled.
Only used if a web application context is a directory.
- Version:
- $Revision: 505593 $
- Author:
- Glenn L. Nielsen
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
This is a delegate forwarding either to our own factory or the original one. -
Constructor Summary
ConstructorDescriptionJspRuntimeContext
(javax.servlet.ServletContext context, Options options, IOProvider ioProvider) Create a JspRuntimeContext for a web application context. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addJspDependencies
(JspServletWrapper jsw, List<String> deps) addWrapper
(String jspUri, JspServletWrapper jsw) Add a new wrappervoid
destroy()
Process a "destroy" event for this web application context.Returns the currentIOProvider
of this context.getWrapper
(String jspUri) Get an already existing JspServletWrapper.boolean
handleModification
(String scriptName, boolean isRemove) Handle jsp modificationsPreload classes required at runtime by a JSP servlet so that we don't get a defineClassInPackage security exception.void
lockTagFileLoading
(String tagFilePath) Locks a tag file path.void
unlockTagFileLoading
(String tagFilePath) Unlocks a tag file path.
-
Constructor Details
-
JspRuntimeContext
public JspRuntimeContext(javax.servlet.ServletContext context, Options options, IOProvider ioProvider) Create a JspRuntimeContext for a web application context. Loads in any previously generated dependencies from file.- Parameters:
context
- ServletContext for web application
-
-
Method Details
-
initFactoryHandler
Preload classes required at runtime by a JSP servlet so that we don't get a defineClassInPackage security exception. And set jsp factory -
addJspDependencies
-
handleModification
Handle jsp modifications -
addWrapper
Add a new wrapper- Parameters:
jspUri
- JSP URIjsw
- Servlet wrapper for JSP
-
getWrapper
Get an already existing JspServletWrapper.- Parameters:
jspUri
- JSP URI- Returns:
- JspServletWrapper for JSP
-
lockTagFileLoading
Locks a tag file path. Use this before loading it.- Parameters:
tagFilePath
- Tag file path
-
unlockTagFileLoading
Unlocks a tag file path. Use this after loading it.- Parameters:
tagFilePath
- Tag file path
-
destroy
public void destroy()Process a "destroy" event for this web application context. -
getIOProvider
Returns the currentIOProvider
of this context.
-