Class AntWebAppContext

All Implemented Interfaces:
Handler, HandlerContainer, Attributes, ClassVisibilityChecker, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, Graceful, LifeCycle, WebAppClassLoader.Context

public class AntWebAppContext extends WebAppContext
Extension of WebAppContext to allow configuration via Ant environment.
  • Field Details


      public static final String DEFAULT_CONTAINER_INCLUDE_JAR_PATTERN
      See Also:
  • Constructor Details

    • AntWebAppContext

      public AntWebAppContext( project) throws Exception
      Default constructor. Takes project as an argument
      project - the project.
      Exception - if unable to create webapp context
  • Method Details

    • dump

      public static void dump(ClassLoader loader)
    • addAttributes

      public void addAttributes(Attributes atts)
      Adds a new Ant's attributes tag object if it have not been created yet.
      atts - the attributes
    • addLib

      public void addLib( lib)
    • addClasses

      public void addClasses( classes)
    • newServletHandler

      protected ServletHandler newServletHandler()
      newServletHandler in class ServletContextHandler
    • setJettyEnvXml

      public void setJettyEnvXml(File jettyEnvXml)
    • getJettyEnvXml

      public File getJettyEnvXml()
    • getLibraries

      public List<File> getLibraries()
    • addScanTargets

      public void addScanTargets( scanTargets)
    • getScanTargetFiles

      public List<File> getScanTargetFiles()
    • getScanFiles

      public List<File> getScanFiles()
    • isScanned

      public boolean isScanned(File file)
    • initScanFiles

      public List<File> initScanFiles()
    • setWar

      public void setWar(String path)
      Description copied from class: WebAppContext
      Set the war of the webapp. From this value a ContextHandler.setResourceBase(String) value is computed by WebInfConfiguration, which may be changed from the war URI by unpacking and/or copying.
      setWar in class WebAppContext
      path - The war to set as a file name or URL.
    • doStart

      public void doStart()
      Description copied from class: ContainerLifeCycle
      Starts the managed lifecycle beans in the order they were added.
      doStart in class WebAppContext
    • doStop

      public void doStop()
      Description copied from class: ContainerLifeCycle
      Stops the managed lifecycle beans in the reverse order they were added.
      doStop in class ServletContextHandler
    • getClassPathFiles

      public List<File> getClassPathFiles()
      a list of classpath files (libraries and class directories).
    • getLibrariesConfiguration

      public FileMatchingConfiguration getLibrariesConfiguration()
      a FileMatchingConfiguration object describing the configuration of all libraries added to this particular web app (both classes and libraries).
    • getContextXml

      public File getContextXml()
    • setContextXml

      public void setContextXml(File contextXml)