Class WebInfConfiguration

    • Constructor Detail

      • WebInfConfiguration

        public WebInfConfiguration()
        Deprecated.
    • Method Detail

      • findAndFilterContainerPaths

        public void findAndFilterContainerPaths​(WebAppContext context)
                                         throws Exception
        Deprecated.
        Find jars and directories that are on the container's classpath and apply an optional filter. The filter is a pattern applied to the full jar or directory names. If there is no pattern, then no jar or dir is considered to match. Those jars that do match will be later examined for META-INF information and annotations. To find them, examine the classloaders in the hierarchy above the webapp classloader that are URLClassLoaders. For jdk-9 we also look at the java.class.path, and the jdk.module.path.
        Parameters:
        context - the WebAppContext being deployed
        Throws:
        Exception - if unable to apply optional filtering on the container's classpath
      • findAndFilterWebAppPaths

        public void findAndFilterWebAppPaths​(WebAppContext context)
                                      throws Exception
        Deprecated.
        Finds the jars that are either physically or virtually in WEB-INF/lib, and applies an optional filter to their full pathnames. The filter selects which jars will later be examined for META-INF information and annotations. If there is no pattern, then all jars are considered selected.
        Parameters:
        context - the WebAppContext being deployed
        Throws:
        Exception - if unable to find the jars or apply filtering
      • deconfigure

        public void deconfigure​(WebAppContext context)
                         throws Exception
        Deprecated.
        Description copied from interface: Configuration
        DeConfigure WebApp. This method is called to undo all configuration done. This is called to allow the context to work correctly over a stop/start cycle
        Specified by:
        deconfigure in interface Configuration
        Overrides:
        deconfigure in class AbstractConfiguration
        Parameters:
        context - The context to configure
        Throws:
        Exception - if unable to deconfigure
      • resolveTempDirectory

        public void resolveTempDirectory​(WebAppContext context)
                                  throws Exception
        Deprecated.
        Get a temporary directory in which to unpack the war etc etc. The algorithm for determining this is to check these alternatives in the order shown:

        A. Try to use an explicit directory specifically for this webapp:

        1. Iff an explicit directory is set for this webapp, use it. Set delete on exit depends on value of persistTempDirectory.
        2. Iff javax.servlet.context.tempdir context attribute is set for this webapp && exists && writeable, then use it. Set delete on exit depends on value of persistTempDirectory.

        B. Create a directory based on global settings. The new directory will be called "Jetty-"+host+"-"+port+"__"+context+"-"+virtualhost+"-"+randomdigits+".dir"

        If the user has specified the context attribute org.eclipse.jetty.webapp.basetempdir, the directory specified by this attribute will be the parent of the temp dir created. Otherwise, the parent dir is ${java.io.tmpdir}. Set delete on exit depends on value of persistTempDirectory.

        Parameters:
        context - the context to resolve the temp directory from
        Throws:
        Exception - if unable to resolve the temp directory
      • configureTempDirectory

        public void configureTempDirectory​(File dir,
                                           WebAppContext context)
        Deprecated.
      • getCanonicalNameForWebAppTmpDir

        public static String getCanonicalNameForWebAppTmpDir​(WebAppContext context)
        Deprecated.
        Create a canonical name for a webapp temp directory.

        The form of the name is:

        "jetty-"+host+"-"+port+"-"+resourceBase+"-_"+context+"-"+virtualhost+"-"+randomdigits+".dir"
        host and port uniquely identify the server context and virtual host uniquely identify the webapp randomdigits ensure every tmp directory is unique
        Parameters:
        context - the context to get the canonical name from
        Returns:
        the canonical name for the webapp temp directory