Class WebInfConfiguration
- java.lang.Object
-
- org.eclipse.jetty.webapp.AbstractConfiguration
-
- org.eclipse.jetty.webapp.WebInfConfiguration
-
- All Implemented Interfaces:
Configuration
@Deprecated(since="2021-05-27") public class WebInfConfiguration extends AbstractConfiguration
Deprecated.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
WebInfConfiguration.ContainerPathNameMatcher
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.class
WebInfConfiguration.WebAppPathNameMatcher
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.-
Nested classes/interfaces inherited from interface org.eclipse.jetty.webapp.Configuration
Configuration.ClassList, Configuration.Wrapper, Configuration.WrapperFunction
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONTAINER_JAR_PATTERN
Deprecated.static java.lang.String
RESOURCE_DIRS
Deprecated.If set, to a list of URLs, these resources are added to the context resource base as a resource collection.static java.lang.String
TEMPDIR_CONFIGURED
Deprecated.static java.lang.String
WEBINF_JAR_PATTERN
Deprecated.-
Fields inherited from interface org.eclipse.jetty.webapp.Configuration
ATTR
-
-
Constructor Summary
Constructors Constructor Description WebInfConfiguration()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
cloneConfigure(WebAppContext template, WebAppContext context)
Deprecated.Clone configuration instance.void
configure(WebAppContext context)
Deprecated.Configure WebApp.void
configureTempDirectory(java.io.File dir, WebAppContext context)
Deprecated.void
deconfigure(WebAppContext context)
Deprecated.DeConfigure WebApp.void
findAndFilterContainerPaths(WebAppContext context)
Deprecated.Find jars and directories that are on the container's classpath and apply an optional filter.void
findAndFilterWebAppPaths(WebAppContext context)
Deprecated.Finds the jars that are either physically or virtually in WEB-INF/lib, and applies an optional filter to their full pathnames.static java.lang.String
getCanonicalNameForWebAppTmpDir(WebAppContext context)
Deprecated.Create a canonical name for a webapp temp directory.void
makeTempDirectory(java.io.File parent, WebAppContext context)
Deprecated.void
preConfigure(WebAppContext context)
Deprecated.Set up for configuration.void
resolveTempDirectory(WebAppContext context)
Deprecated.Get a temporary directory in which to unpack the war etc etc.void
unpack(WebAppContext context)
Deprecated.-
Methods inherited from class org.eclipse.jetty.webapp.AbstractConfiguration
destroy, postConfigure
-
-
-
-
Field Detail
-
TEMPDIR_CONFIGURED
public static final java.lang.String TEMPDIR_CONFIGURED
Deprecated.- See Also:
- Constant Field Values
-
CONTAINER_JAR_PATTERN
public static final java.lang.String CONTAINER_JAR_PATTERN
Deprecated.- See Also:
- Constant Field Values
-
WEBINF_JAR_PATTERN
public static final java.lang.String WEBINF_JAR_PATTERN
Deprecated.- See Also:
- Constant Field Values
-
RESOURCE_DIRS
public static final java.lang.String RESOURCE_DIRS
Deprecated.If set, to a list of URLs, these resources are added to the context resource base as a resource collection.- See Also:
- Constant Field Values
-
-
Method Detail
-
preConfigure
public void preConfigure(WebAppContext context) throws java.lang.Exception
Deprecated.Description copied from interface:Configuration
Set up for configuration.Typically this step discovers configuration resources
- Specified by:
preConfigure
in interfaceConfiguration
- Overrides:
preConfigure
in classAbstractConfiguration
- Parameters:
context
- The context to configure- Throws:
java.lang.Exception
- if unable to pre configure
-
findAndFilterContainerPaths
public void findAndFilterContainerPaths(WebAppContext context) throws java.lang.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:
java.lang.Exception
- if unable to apply optional filtering on the container's classpath
-
findAndFilterWebAppPaths
public void findAndFilterWebAppPaths(WebAppContext context) throws java.lang.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:
java.lang.Exception
- if unable to find the jars or apply filtering
-
configure
public void configure(WebAppContext context) throws java.lang.Exception
Deprecated.Description copied from interface:Configuration
Configure WebApp.Typically this step applies the discovered configuration resources to either the
WebAppContext
or the associatedMetaData
.- Specified by:
configure
in interfaceConfiguration
- Overrides:
configure
in classAbstractConfiguration
- Parameters:
context
- The context to configure- Throws:
java.lang.Exception
- if unable to configure
-
deconfigure
public void deconfigure(WebAppContext context) throws java.lang.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 interfaceConfiguration
- Overrides:
deconfigure
in classAbstractConfiguration
- Parameters:
context
- The context to configure- Throws:
java.lang.Exception
- if unable to deconfigure
-
cloneConfigure
public void cloneConfigure(WebAppContext template, WebAppContext context) throws java.lang.Exception
Deprecated.Description copied from interface:Configuration
Clone configuration instance.Configure an instance of a WebAppContext, based on a template WebAppContext that has previously been configured by this Configuration.
- Specified by:
cloneConfigure
in interfaceConfiguration
- Overrides:
cloneConfigure
in classAbstractConfiguration
- Parameters:
template
- The template contextcontext
- The context to configure- Throws:
java.lang.Exception
- if unable to clone- See Also:
AbstractConfiguration.cloneConfigure(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.webapp.WebAppContext)
-
resolveTempDirectory
public void resolveTempDirectory(WebAppContext context) throws java.lang.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:
- Iff an explicit directory is set for this webapp, use it. Set delete on exit depends on value of persistTempDirectory.
- 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:
java.lang.Exception
- if unable to resolve the temp directory
-
makeTempDirectory
public void makeTempDirectory(java.io.File parent, WebAppContext context) throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
-
configureTempDirectory
public void configureTempDirectory(java.io.File dir, WebAppContext context)
Deprecated.
-
unpack
public void unpack(WebAppContext context) throws java.io.IOException
Deprecated.- Throws:
java.io.IOException
-
getCanonicalNameForWebAppTmpDir
public static java.lang.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
-
-