Class AntWebAppContext

  • All Implemented Interfaces:
    org.eclipse.jetty.server.Handler, org.eclipse.jetty.server.HandlerContainer, org.eclipse.jetty.util.Attributes, org.eclipse.jetty.util.ClassVisibilityChecker, org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.Dumpable.DumpableContainer, org.eclipse.jetty.util.component.Graceful, org.eclipse.jetty.util.component.LifeCycle, WebAppClassLoader.Context

    public class AntWebAppContext
    extends WebAppContext
    Extension of WebAppContext to allow configuration via Ant environment.
    • Constructor Detail

      • AntWebAppContext

        public AntWebAppContext​(org.apache.tools.ant.Project project)
                         throws java.lang.Exception
        Default constructor. Takes project as an argument
        Parameters:
        project - the project.
        Throws:
        java.lang.Exception - if unable to create webapp context
    • Method Detail

      • dump

        public static void dump​(java.lang.ClassLoader loader)
      • addAttributes

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

        public void addLib​(org.apache.tools.ant.types.FileSet lib)
      • addClasses

        public void addClasses​(org.apache.tools.ant.types.FileSet classes)
      • newServletHandler

        protected org.eclipse.jetty.servlet.ServletHandler newServletHandler()
        Overrides:
        newServletHandler in class org.eclipse.jetty.servlet.ServletContextHandler
      • setJettyEnvXml

        public void setJettyEnvXml​(java.io.File jettyEnvXml)
      • getJettyEnvXml

        public java.io.File getJettyEnvXml()
      • getLibraries

        public java.util.List getLibraries()
      • addScanTargets

        public void addScanTargets​(org.apache.tools.ant.types.FileSet scanTargets)
      • getScanTargetFiles

        public java.util.List getScanTargetFiles()
      • getScanFiles

        public java.util.List<java.io.File> getScanFiles()
      • isScanned

        public boolean isScanned​(java.io.File file)
      • initScanFiles

        public java.util.List<java.io.File> initScanFiles()
      • setWar

        public void setWar​(java.lang.String path)
        Overrides:
        setWar in class WebAppContext
      • getClassPathFiles

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

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

        public java.io.File getContextXml()
      • setContextXml

        public void setContextXml​(java.io.File contextXml)