|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.startup.ContextConfig
public class ContextConfig
Startup event listener for a Context that configures the properties of that Context, and the associated defined servlets.
Nested Class Summary | |
---|---|
protected class |
ContextConfig.ContextErrorHandler
|
protected class |
ContextConfig.ServletContainerInitializerInfo
|
Field Summary | |
---|---|
protected static java.util.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 java.util.Map |
customAuthenticators
Custom mappings of login methods to authenticators |
protected java.lang.String |
defaultContextXml
The default web application's context file location. |
protected java.lang.String |
defaultWebXml
The default web application's deployment descriptor location. |
protected static long |
deploymentCount
Deployment count. |
protected static LoginConfig |
DUMMY_LOGIN_CONFIG
|
protected static Digester |
fragmentOrderingDigester
The Digester we will use to parse fragment ordering. |
protected java.util.Map<java.lang.Class<?>,ContextConfig.ServletContainerInitializerInfo> |
handlesTypes
|
protected java.lang.Class<?>[] |
handlesTypesArray
Used to speed up scanning for the services interest classes. |
protected static org.jboss.logging.Logger |
log
|
protected boolean |
ok
Track any fatal errors during startup configuration processing. |
protected java.util.LinkedList<java.lang.String> |
order
|
protected static Digester |
orderingDigester
The Digester we will use to parse absolute ordering in web.xml. |
protected java.lang.String |
originalDocBase
Original docBase. |
protected java.util.ArrayList<java.lang.String> |
overlays
|
protected org.xml.sax.SAXParseException |
parseException
Any parse error which occurred while parsing XML descriptors. |
protected java.util.Map<java.lang.String,ContextConfig.ServletContainerInitializerInfo> |
servletContainerInitializerInfos
|
protected static StringManager |
sm
The string resources for this package. |
protected static Digester |
tldDigester
The Digester we will use to process tag library
descriptor files. |
protected java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
TLDs
|
protected static Digester |
webDigester
The Digester we will use to process web application
deployment descriptor files. |
protected static Digester |
webFragmentDigester
The Digester we will use to process web application
fragment descriptor files. |
protected static WebRuleSet |
webFragmentRuleSet
The Rule used to parse web-fragment.xml files. |
protected java.util.ArrayList<java.lang.String> |
webFragments
|
protected static WebRuleSet |
webRuleSet
The Rule used to parse the web.xml. |
Constructor Summary | |
---|---|
ContextConfig()
|
Method Summary | |
---|---|
protected void |
antiLocking()
|
protected void |
applicationExtraDescriptorsConfig()
Process additional descriptors: TLDs, web fragments, and map overlays. |
void |
applicationServletContainerInitializerConfig()
Find and parse ServletContainerInitializer service in specified JAR. |
protected void |
applicationTldConfig()
Parse TLDs. |
protected void |
applicationWebConfig()
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 |
beforeStart()
Process a "before start" event for this Context. |
protected void |
completeConfig()
Process a "start" event for this Context. |
protected void |
contextConfig()
Process the default configuration file, if it exists. |
protected static Digester |
createContextDigester()
Create (if necessary) and return a Digester configured to process the context configuration descriptor for an application. |
protected static Digester |
createFragmentOrderingDigester()
Create (if necessary) and return a Digester configured to process web fragments ordering. |
protected void |
createFragmentsOrder()
Parse fragments order. |
protected static Digester |
createTldDigester()
Create (if necessary) and return a Digester configured to process tag library descriptors. |
protected static Digester |
createWebDigester()
Create (if necessary) and return a Digester configured to process the web application deployment descriptor (web.xml). |
protected static Digester |
createWebFragmentDigester()
Create (if necessary) and return a Digester configured to process the web application fragment descriptors (web-fragment.xml). |
protected void |
defaultWebConfig()
Process the default configuration file, if it exists. |
protected void |
destroy()
Process a "destroy" event for this Context. |
protected void |
fixDocBase()
Adjust docBase. |
protected java.lang.String |
getBaseDir()
|
protected java.lang.String |
getClassName(java.lang.String filePath)
Get class name given a path to a classfile. |
protected java.io.File |
getConfigBase()
Get config base. |
java.lang.String |
getDefaultContextXml()
Return the location of the default context file |
java.lang.String |
getDefaultWebXml()
Return the location of the default deployment descriptor |
protected java.lang.String |
getHostConfigPath(java.lang.String resourceName)
|
protected java.lang.String |
getJarName(java.util.List<WebOrdering> orderings,
java.lang.String name)
Get the jar name corresponding to the ordering name. |
java.util.Iterator<java.lang.String> |
getOverlays()
|
java.util.Map<java.lang.String,ContextConfig.ServletContainerInitializerInfo> |
getServletContainerInitializerInfo()
|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getTLDs()
|
java.util.Iterator<java.lang.String> |
getWebFragments()
|
protected void |
init()
Process a "init" event for this Context. |
void |
lifecycleEvent(LifecycleEvent event)
Process events for an associated Context. |
protected void |
processConfigAnnotations(java.lang.Class<?> clazz)
Process the application classes annotations, if it exists. |
protected void |
processContextConfig(java.io.File baseDir,
java.lang.String resourceName)
Process a context.xml. |
protected void |
processDefaultWebConfig(Digester digester,
java.io.InputStream stream,
org.xml.sax.InputSource source)
Process a default web.xml. |
protected void |
resolveServletSecurity()
Translate servlet security associated with Servlets to security constraints. |
protected void |
scanClass(java.lang.String className,
boolean annotations)
|
protected void |
scanClasses(java.io.File folder,
java.lang.String path,
boolean annotations)
Scan folder containing class files. |
protected void |
scanJar(java.util.jar.JarFile jarFile,
boolean annotations)
|
void |
scanJarForServletContainerInitializer(java.util.jar.JarFile file)
Find and parse ServletContainerInitializer service in specified JAR. |
void |
setCustomAuthenticators(java.util.Map customAuthenticators)
Sets custom mappings of login methods to authenticators. |
void |
setDefaultContextXml(java.lang.String path)
Set the location of the default context file |
void |
setDefaultWebXml(java.lang.String path)
Set the location of the default deployment descriptor |
protected void |
start()
Process a "start" event for this Context. |
protected void |
stop()
Process a "stop" event for this Context. |
protected void |
tldScanResourcePathsWebInf(javax.naming.directory.DirContext resources,
java.lang.String rootPath,
java.util.HashSet<java.lang.String> tldPaths)
Scans the web application's subdirectory identified by rootPath, along with its subdirectories, for TLDs. |
protected java.lang.String |
toHttpMethod(java.lang.String method)
Although this does not comply with the spec, it is likely Java method names will be used in the annotations. |
protected void |
validateSecurityRoles()
Validate the usage of security role names in the web application deployment descriptor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.jboss.logging.Logger log
protected java.util.Map customAuthenticators
protected static java.util.Properties authenticators
protected Context context
protected java.lang.String defaultContextXml
protected java.lang.String defaultWebXml
protected boolean ok
protected org.xml.sax.SAXParseException parseException
protected java.lang.String originalDocBase
protected static final StringManager sm
protected static Digester contextDigester
Digester
we will use to process web application
context files.
protected static Digester webDigester
Digester
we will use to process web application
deployment descriptor files.
protected static Digester webFragmentDigester
Digester
we will use to process web application
fragment descriptor files.
protected static Digester tldDigester
Digester
we will use to process tag library
descriptor files.
protected static Digester fragmentOrderingDigester
Digester
we will use to parse fragment ordering.
protected static Digester orderingDigester
Digester
we will use to parse absolute ordering in web.xml.
protected static WebRuleSet webRuleSet
Rule
used to parse the web.xml.
protected static WebRuleSet webFragmentRuleSet
Rule
used to parse web-fragment.xml files.
protected static long deploymentCount
protected static final LoginConfig DUMMY_LOGIN_CONFIG
protected java.util.ArrayList<java.lang.String> overlays
protected java.util.ArrayList<java.lang.String> webFragments
protected java.util.Map<java.lang.String,java.util.Set<java.lang.String>> TLDs
protected java.util.Map<java.lang.String,ContextConfig.ServletContainerInitializerInfo> servletContainerInitializerInfos
protected java.util.LinkedList<java.lang.String> order
protected java.lang.Class<?>[] handlesTypesArray
protected java.util.Map<java.lang.Class<?>,ContextConfig.ServletContainerInitializerInfo> handlesTypes
Constructor Detail |
---|
public ContextConfig()
Method Detail |
---|
public java.lang.String getDefaultWebXml()
public void setDefaultWebXml(java.lang.String path)
path
- Absolute/relative path to the default web.xmlpublic java.lang.String getDefaultContextXml()
public void setDefaultContextXml(java.lang.String path)
path
- Absolute/relative path to the default context.xmlpublic void setCustomAuthenticators(java.util.Map customAuthenticators)
customAuthenticators
- Custom mappings of login methods to
authenticatorspublic java.util.Iterator<java.lang.String> getOverlays()
public java.util.Iterator<java.lang.String> getWebFragments()
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getTLDs()
public java.util.Map<java.lang.String,ContextConfig.ServletContainerInitializerInfo> getServletContainerInitializerInfo()
public void lifecycleEvent(LifecycleEvent event)
lifecycleEvent
in interface LifecycleListener
event
- The lifecycle event that has occurredprotected void processConfigAnnotations(java.lang.Class<?> clazz)
protected void applicationWebConfig()
protected void applicationTldConfig()
protected void authenticatorConfig()
protected static Digester createWebDigester()
protected static Digester createWebFragmentDigester()
protected static Digester createTldDigester()
protected static Digester createFragmentOrderingDigester()
protected static Digester createContextDigester()
protected java.lang.String getBaseDir()
protected void defaultWebConfig()
protected void processDefaultWebConfig(Digester digester, java.io.InputStream stream, org.xml.sax.InputSource source)
protected void createFragmentsOrder()
protected java.lang.String getJarName(java.util.List<WebOrdering> orderings, java.lang.String name)
protected void applicationExtraDescriptorsConfig()
protected void scanJar(java.util.jar.JarFile jarFile, boolean annotations)
protected void tldScanResourcePathsWebInf(javax.naming.directory.DirContext resources, java.lang.String rootPath, java.util.HashSet<java.lang.String> tldPaths)
resources
- The web application's resourcesrootPath
- The path whose subdirectories are to be searched for
TLDstldPaths
- The set of TLD resource paths to add toprotected void scanClasses(java.io.File folder, java.lang.String path, boolean annotations)
protected void scanClass(java.lang.String className, boolean annotations)
protected java.lang.String getClassName(java.lang.String filePath)
public void applicationServletContainerInitializerConfig()
public void scanJarForServletContainerInitializer(java.util.jar.JarFile file)
protected void contextConfig()
protected void processContextConfig(java.io.File baseDir, java.lang.String resourceName)
protected void fixDocBase() throws java.io.IOException
java.io.IOException
protected void antiLocking()
protected void init()
protected void beforeStart()
protected void start()
protected void completeConfig()
protected void stop()
protected void destroy()
protected void resolveServletSecurity()
protected java.lang.String toHttpMethod(java.lang.String method)
method
-
protected void validateSecurityRoles()
ok
instance variable to false
as well).
protected java.io.File getConfigBase()
protected java.lang.String getHostConfigPath(java.lang.String resourceName)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |