Class JspRuntimeContext

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

public final class JspRuntimeContext extends 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
  • 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

      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, List<String> deps)
    • handleModification

      public boolean handleModification(String scriptName, boolean isRemove)
      Handle jsp modifications
    • addWrapper

      public JspServletWrapper addWrapper(String jspUri, JspServletWrapper jsw)
      Add a new wrapper
      Parameters:
      jspUri - JSP URI
      jsw - Servlet wrapper for JSP
    • getWrapper

      public JspServletWrapper getWrapper(String jspUri)
      Get an already existing JspServletWrapper.
      Parameters:
      jspUri - JSP URI
      Returns:
      JspServletWrapper for JSP
    • lockTagFileLoading

      public void lockTagFileLoading(String tagFilePath)
      Locks a tag file path. Use this before loading it.
      Parameters:
      tagFilePath - Tag file path
    • unlockTagFileLoading

      public void unlockTagFileLoading(String tagFilePath)
      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

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