public class WebInfConfiguration extends AbstractConfiguration
Configuration.ClassList| Modifier and Type | Field and Description |
|---|---|
protected Resource |
_preUnpackBaseResource |
static String |
CONTAINER_JAR_PATTERN |
static String |
RESOURCE_DIRS
If set, to a list of URLs, these resources are added to the context
resource base as a resource collection.
|
static String |
TEMPDIR_CONFIGURED |
static String |
WEBINF_JAR_PATTERN |
ATTR| Constructor and Description |
|---|
WebInfConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
void |
cloneConfigure(WebAppContext template,
WebAppContext context)
Clone configuration instance.
|
void |
configure(WebAppContext context)
Configure WebApp.
|
void |
configureTempDirectory(File dir,
WebAppContext context) |
void |
deconfigure(WebAppContext context)
DeConfigure WebApp.
|
protected List<Resource> |
findClassDirs(WebAppContext context) |
protected List<Resource> |
findExtraClasspathDirs(WebAppContext context)
Get class dirs from WebAppContext.getExtraClasspath as resources
|
protected List<Resource> |
findExtraClasspathJars(WebAppContext context)
Get jars from WebAppContext.getExtraClasspath as resources
|
protected List<Resource> |
findJars(WebAppContext context)
Look for jars that should be treated as if they are in WEB-INF/lib
|
protected Resource |
findWebInfClassesDir(WebAppContext context)
Get WEB-INF/classes dir
|
protected List<Resource> |
findWebInfLibJars(WebAppContext context)
Look for jars in WEB-INF/lib
|
static String |
getCanonicalNameForWebAppTmpDir(WebAppContext context)
Create a canonical name for a webapp temp directory.
|
void |
makeTempDirectory(File parent,
WebAppContext context) |
void |
preConfigure(WebAppContext context)
Set up for configuration.
|
void |
resolveTempDirectory(WebAppContext context)
Get a temporary directory in which to unpack the war etc etc.
|
void |
unpack(WebAppContext context) |
destroy, postConfigurepublic static final String TEMPDIR_CONFIGURED
public static final String CONTAINER_JAR_PATTERN
public static final String WEBINF_JAR_PATTERN
public static final String RESOURCE_DIRS
protected Resource _preUnpackBaseResource
public void preConfigure(WebAppContext context) throws Exception
ConfigurationTypically this step discovers configuration resources
preConfigure in interface ConfigurationpreConfigure in class AbstractConfigurationcontext - The context to configureExceptionpublic void configure(WebAppContext context) throws Exception
Configuration
Typically this step applies the discovered configuration resources to
either the WebAppContext or the associated MetaData.
configure in interface Configurationconfigure in class AbstractConfigurationcontext - The context to configureExceptionpublic void deconfigure(WebAppContext context) throws Exception
Configurationdeconfigure in interface Configurationdeconfigure in class AbstractConfigurationcontext - The context to configureExceptionpublic void cloneConfigure(WebAppContext template, WebAppContext context) throws Exception
ConfigurationConfigure an instance of a WebAppContext, based on a template WebAppContext that has previously been configured by this Configuration.
cloneConfigure in interface ConfigurationcloneConfigure in class AbstractConfigurationtemplate - The template contextcontext - The context to configureExceptionAbstractConfiguration.cloneConfigure(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.webapp.WebAppContext)public void resolveTempDirectory(WebAppContext context) throws Exception
A. Try to use an explicit directory specifically for this webapp:
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.
Exceptionpublic void makeTempDirectory(File parent, WebAppContext context) throws Exception
Exceptionpublic void configureTempDirectory(File dir, WebAppContext context)
public void unpack(WebAppContext context) throws IOException
IOExceptionpublic static String getCanonicalNameForWebAppTmpDir(WebAppContext context)
"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 uniqueprotected List<Resource> findClassDirs(WebAppContext context) throws Exception
Exceptionprotected List<Resource> findJars(WebAppContext context) throws Exception
context - Exceptionprotected List<Resource> findWebInfLibJars(WebAppContext context) throws Exception
context - Exceptionprotected List<Resource> findExtraClasspathJars(WebAppContext context) throws Exception
context - Exceptionprotected Resource findWebInfClassesDir(WebAppContext context) throws Exception
context - Exceptionprotected List<Resource> findExtraClasspathDirs(WebAppContext context) throws Exception
context - ExceptionCopyright © 1995-2015 Webtide. All Rights Reserved.