org.apache.sling.scripting.jsp.jasper.compiler
Class JspRuntimeContext

java.lang.Object
  extended by org.apache.sling.scripting.jsp.jasper.compiler.JspRuntimeContext

public final class JspRuntimeContext
extends java.lang.Object

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
static class JspRuntimeContext.JspFactoryHandler
          This is a delegate forwarding either to our own factory or the original one.
 
Constructor Summary
JspRuntimeContext(javax.servlet.ServletContext context, Options options, IOProvider ioProvider)
          Create a JspRuntimeContext for a web application context.
 
Method Summary
 void addJspDependencies(JspServletWrapper jsw)
           
 void addWrapper(java.lang.String jspUri, JspServletWrapper jsw)
          Add a new wrapper
 void destroy()
          Process a "destroy" event for this web application context.
 IOProvider getIOProvider()
          Returns the current IOProvider of this context.
 JspServletWrapper getWrapper(java.lang.String jspUri)
          Get an already existing JspServletWrapper.
 boolean handleModification(java.lang.String scriptName)
          Handle jsp modifications
static JspRuntimeContext.JspFactoryHandler initFactoryHandler()
          Preload classes required at runtime by a JSP servlet so that we don't get a defineClassInPackage security exception.
 void removeWrapper(java.lang.String jspUri)
          Remove a JspServletWrapper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

initFactoryHandler

public static JspRuntimeContext.JspFactoryHandler 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

public void addJspDependencies(JspServletWrapper jsw)

handleModification

public boolean handleModification(java.lang.String scriptName)
Handle jsp modifications


addWrapper

public void addWrapper(java.lang.String jspUri,
                       JspServletWrapper jsw)
Add a new wrapper

Parameters:
jspUri - JSP URI
jsw - Servlet wrapper for JSP

getWrapper

public JspServletWrapper getWrapper(java.lang.String jspUri)
Get an already existing JspServletWrapper.

Parameters:
jspUri - JSP URI
Returns:
JspServletWrapper for JSP

removeWrapper

public void removeWrapper(java.lang.String jspUri)
Remove a JspServletWrapper.

Parameters:
jspUri - JSP URI of JspServletWrapper to remove

destroy

public void destroy()
Process a "destroy" event for this web application context.


getIOProvider

public IOProvider getIOProvider()
Returns the current IOProvider of this context.



Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.