public class ConfigureListener
extends java.lang.Object
implements javax.servlet.ServletContextListener
Parse all relevant JavaServer Faces configuration resources, and configure the Reference Implementation runtime environment.
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
FACES_CONFIG_BEAN_KEY
ServletContext attribute key. |
protected static java.lang.String |
JSF_RI_CONFIG
The path to the RI main configuration file.
|
protected static java.lang.String |
META_INF_RESOURCES
The resource path for faces-config files included in the
META-INF directory of JAR files. |
protected static java.lang.String |
WEB_INF_RESOURCE
The resource path for the faces configuration in the
WEB-INF directory of an application. |
protected WebConfiguration |
webConfig |
Constructor and Description |
---|
ConfigureListener() |
Modifier and Type | Method and Description |
---|---|
protected void |
configure(javax.servlet.ServletContext context,
FacesConfigBean config)
Configure the JavaServer Faces reference implementation based on
the accumulated configuration beans.
|
void |
contextDestroyed(javax.servlet.ServletContextEvent sce) |
void |
contextInitialized(javax.servlet.ServletContextEvent sce) |
protected org.apache.commons.digester.Digester |
digester(boolean validateXml)
Configure and return a
Digester instance suitable for
parsing the runtime configuration information we need. |
protected boolean |
isFeatureEnabled(WebConfiguration.BooleanWebContextInitParameter param)
Determines if a particular feature, configured via the web
deployment descriptor as a
true/false value, is
enabled or not. |
void |
logOverriddenContextConfigValues()
A subclass of ConfigureListener can override isFeatureEnabled and reset
one of the boolean values.
|
protected void |
parse(org.apache.commons.digester.Digester digester,
java.net.URL url,
FacesConfigBean fcb)
Parse the configuration resource at the specified URL, using
the specified
Digester instance. |
void |
registerELResolverAndListenerWithJsp(javax.servlet.ServletContext context) |
protected void |
releaseDigester(org.apache.commons.digester.Digester toRelease) |
protected static final java.lang.String FACES_CONFIG_BEAN_KEY
ServletContext
attribute key.
protected static final java.lang.String JSF_RI_CONFIG
The path to the RI main configuration file.
protected static final java.lang.String META_INF_RESOURCES
The resource path for faces-config files included in the
META-INF
directory of JAR files.
protected static final java.lang.String WEB_INF_RESOURCE
The resource path for the faces configuration in the
WEB-INF
directory of an application.
protected WebConfiguration webConfig
public void logOverriddenContextConfigValues()
public void contextInitialized(javax.servlet.ServletContextEvent sce)
contextInitialized
in interface javax.servlet.ServletContextListener
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
contextDestroyed
in interface javax.servlet.ServletContextListener
protected void configure(javax.servlet.ServletContext context, FacesConfigBean config) throws java.lang.Exception
Configure the JavaServer Faces reference implementation based on the accumulated configuration beans.
context
- ServletContext
for this web applicationconfig
- FacesConfigBean
that is the root of the
tree of configuration informationjava.lang.Exception
- if an error occurs during the boostrap processprotected org.apache.commons.digester.Digester digester(boolean validateXml)
Configure and return a Digester
instance suitable for
parsing the runtime configuration information we need.
validateXml
- if true, validation is turned on during parsing.Digester instance suitable for parsing
faces-config documents
protected void releaseDigester(org.apache.commons.digester.Digester toRelease)
protected void parse(org.apache.commons.digester.Digester digester, java.net.URL url, FacesConfigBean fcb)
Parse the configuration resource at the specified URL, using
the specified Digester
instance.
digester
- Digester to use for parsingurl
- URL of the configuration resource to be parsedfcb
- FacesConfigBean to accumulate resultsprotected boolean isFeatureEnabled(WebConfiguration.BooleanWebContextInitParameter param)
Determines if a particular feature, configured via the web
deployment descriptor as a true/false
value, is
enabled or not.
param
- the BooleanWebContextInitParameter
of interesttrue
if the feature in question is enabled, otherwise
false
public void registerELResolverAndListenerWithJsp(javax.servlet.ServletContext context)
Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.