public class WebInfConfiguration extends AbstractConfiguration
| Modifier and Type | Field and Description |
|---|---|
protected Resource |
_preUnpackBaseResource |
static java.lang.String |
CONTAINER_JAR_PATTERN |
static java.lang.String |
RESOURCE_URLS
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 |
static java.lang.String |
WEBINF_JAR_PATTERN |
| 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 |
deconfigure(WebAppContext context)
DeConfigure WebApp.
|
protected java.util.List<Resource> |
findJars(WebAppContext context)
Look for jars in WEB-INF/lib
|
java.io.File |
findWorkDirectory(WebAppContext context) |
static java.lang.String |
getCanonicalNameForWebAppTmpDir(WebAppContext context)
Create a canonical name for a webapp temp directory.
|
boolean |
isTempWorkDirectory(java.io.File tmpDir)
Check if the tmpDir itself is called "work", or if the tmpDir
is in a directory called "work".
|
void |
makeTempDirectory(java.io.File parent,
WebAppContext context,
boolean deleteExisting) |
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 java.lang.String TEMPDIR_CONFIGURED
public static final java.lang.String CONTAINER_JAR_PATTERN
public static final java.lang.String WEBINF_JAR_PATTERN
public static final java.lang.String RESOURCE_URLS
protected Resource _preUnpackBaseResource
public void preConfigure(WebAppContext context) throws java.lang.Exception
ConfigurationTypically this step discovers configuration resources
preConfigure in interface ConfigurationpreConfigure in class AbstractConfigurationcontext - The context to configurejava.lang.Exceptionpublic void configure(WebAppContext context) throws java.lang.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 configurejava.lang.Exceptionpublic void deconfigure(WebAppContext context) throws java.lang.Exception
Configurationdeconfigure in interface Configurationdeconfigure in class AbstractConfigurationcontext - The context to configurejava.lang.Exceptionpublic void cloneConfigure(WebAppContext template, WebAppContext context) throws java.lang.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 configurejava.lang.ExceptionAbstractConfiguration.cloneConfigure(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.webapp.WebAppContext)public void resolveTempDirectory(WebAppContext context)
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 Work out where to create this directory:
public void makeTempDirectory(java.io.File parent,
WebAppContext context,
boolean deleteExisting)
throws java.io.IOException
java.io.IOExceptionpublic void unpack(WebAppContext context) throws java.io.IOException
java.io.IOExceptionpublic java.io.File findWorkDirectory(WebAppContext context) throws java.io.IOException
java.io.IOExceptionpublic boolean isTempWorkDirectory(java.io.File tmpDir)
public static java.lang.String getCanonicalNameForWebAppTmpDir(WebAppContext context)
"Jetty_"+host+"_"+port+"__"+resourceBase+"_"+context+"_"+virtualhost+base36_hashcode_of_whole_string
host and port uniquely identify the server
context and virtual host uniquely identify the webappprotected java.util.List<Resource> findJars(WebAppContext context) throws java.lang.Exception
context - java.lang.ExceptionCopyright © 2013 FuseSource, Corp.. All Rights Reserved.