public class ContextConfig extends Object implements LifecycleListener
Modifier and Type | Class and Description |
---|---|
protected class |
ContextConfig.ContextErrorHandler |
Modifier and Type | Field and Description |
---|---|
protected static Properties |
authenticators
The set of Authenticators that we know how to configure.
|
protected Context |
context
The Context we are associated with.
|
protected static Digester |
contextDigester
The
Digester we will use to process web application
context files. |
protected Map<String,Authenticator> |
customAuthenticators |
protected String |
defaultContextXml
The default web application's context file location.
|
protected String |
defaultWebXml
The default web application's deployment descriptor location.
|
protected boolean |
ok
Track any fatal errors during startup configuration processing.
|
protected SAXParseException |
parseException
Any parse error which occurred while parsing XML descriptors.
|
protected static Digester |
webDigester
The
Digester we will use to process web application
deployment descriptor files. |
protected static WebRuleSet |
webRuleSet
The
Rule used to parse the web.xml |
Constructor and Description |
---|
ContextConfig() |
Modifier and Type | Method and Description |
---|---|
protected void |
applicationConfig()
Process the application configuration file, if it exists.
|
protected void |
authenticatorConfig()
Set up an Authenticator automatically if required, and one has not
already been configured.
|
protected void |
contextConfig()
Process the default configuration file, if it exists.
|
protected static Digester |
createContextDigester()
Create and return a Digester configured to process the
context configuration descriptor for an application.
|
static Digester |
createWebDigester()
Create and return a Digester configured to process the
web application deployment descriptor (web.xml).
|
static Digester |
createWebXmlDigester(boolean namespaceAware,
boolean validation) |
protected void |
defaultConfig()
Process the default configuration file, if it exists.
|
protected void |
fixDocBase()
Adjust docBase.
|
protected String |
getBaseDir() |
int |
getDebug()
Return the debugging detail level for this component.
|
String |
getDefaultContextXml()
Return the location of the default context file
|
String |
getDefaultWebXml()
Return the location of the default deployment descriptor
|
protected void |
init()
Process a "init" event for this Context.
|
void |
lifecycleEvent(LifecycleEvent event)
Process the START event for an associated Context.
|
protected void |
managerConfig()
Set up a manager.
|
protected void |
processContextConfig(File baseDir,
String resourceName)
Process a context.xml.
|
void |
setClassLoader(ClassLoader cl) |
void |
setCustomAuthenticators(Map<String,Authenticator> customAuthenticators)
Sets custom mappings of login methods to authenticators.
|
void |
setDebug(int debug)
Set the debugging detail level for this component.
|
void |
setDefaultContextXml(String path)
Set the location of the default context file
|
void |
setDefaultWebXml(String path)
Set the location of the default deployment descriptor
|
protected void |
start()
Process a "start" event for this Context - in background
|
protected void |
stop()
Process a "stop" event for this Context.
|
protected void |
validateSecurityRoles()
Validate the usage of security role names in the web application
deployment descriptor.
|
protected Map<String,Authenticator> customAuthenticators
protected static final Properties authenticators
protected Context context
protected String defaultContextXml
protected String defaultWebXml
protected boolean ok
protected SAXParseException parseException
protected static final Digester contextDigester
Digester
we will use to process web application
context files.protected static final Digester webDigester
Digester
we will use to process web application
deployment descriptor files.protected static final WebRuleSet webRuleSet
Rule
used to parse the web.xmlpublic void setClassLoader(ClassLoader cl)
public int getDebug()
public void setDebug(int debug)
debug
- The new debugging detail levelpublic String getDefaultWebXml()
public void setDefaultWebXml(String path)
path
- Absolute/relative path to the default web.xmlpublic String getDefaultContextXml()
public void setDefaultContextXml(String path)
path
- Absolute/relative path to the default context.xmlpublic void setCustomAuthenticators(Map<String,Authenticator> customAuthenticators)
customAuthenticators
- Custom mappings of login methods to
authenticatorspublic void lifecycleEvent(LifecycleEvent event) throws LifecycleException
lifecycleEvent
in interface LifecycleListener
event
- The lifecycle event that has occurredLifecycleException
protected void applicationConfig() throws LifecycleException
LifecycleException
protected void managerConfig()
protected void authenticatorConfig() throws LifecycleException
LifecycleException
public static Digester createWebDigester()
public static Digester createWebXmlDigester(boolean namespaceAware, boolean validation)
protected static Digester createContextDigester()
protected String getBaseDir()
protected void defaultConfig() throws LifecycleException
LifecycleException
protected void contextConfig()
protected void processContextConfig(File baseDir, String resourceName)
protected void fixDocBase() throws IOException
IOException
protected void init()
protected void start() throws LifecycleException
LifecycleException
protected void stop()
protected void validateSecurityRoles()
ok
instance variable to false
as well).Copyright © 2019. All rights reserved.