com.sun.faces.config
private static class ConfigureListener.WebXmlProcessor extends java.lang.Object
Processes a web application's deployment descriptor looking
for a reference to javax.faces.webapp.FacesServlet
.
Modifier and Type | Class and Description |
---|---|
private class |
ConfigureListener.WebXmlProcessor.WebXmlHandler
A simple SAX handler to process the elements of interested
within a web application's deployment descriptor.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
errorPagePresent |
private boolean |
facesServletPresent |
private static java.lang.String |
WEB_FRAGMENT_PATH |
private static java.lang.String |
WEB_XML_PATH |
Constructor and Description |
---|
ConfigureListener.WebXmlProcessor(javax.servlet.ServletContext context)
When instantiated, the web.xml of the current application
will be scanned looking for a references to the
FacesServlet . |
Modifier and Type | Method and Description |
---|---|
private javax.xml.parsers.SAXParserFactory |
getConfiguredFactory()
Return a
SAXParserFactory instance that is
non-validating and is namespace aware. |
(package private) boolean |
isErrorPagePresent() |
(package private) boolean |
isFacesServletPresent() |
private void |
scanForFacesServlet(javax.servlet.ServletContext context)
Parse the web.xml for the current application and scan
for a FacesServlet entry, if found, set the
facesServletPresent property to true. |
private void |
warnProcessingError(java.lang.Exception e,
javax.servlet.ServletContext sc) |
private static final java.lang.String WEB_XML_PATH
private static final java.lang.String WEB_FRAGMENT_PATH
private boolean facesServletPresent
private boolean errorPagePresent
ConfigureListener.WebXmlProcessor(javax.servlet.ServletContext context)
When instantiated, the web.xml of the current application
will be scanned looking for a references to the
FacesServlet
. isFacesServletPresent()
will return the appropriate value based on the scan.
context
- the ServletContext
for the application
of interestboolean isFacesServletPresent()
true
if the WebXmlProcessor
detected a FacesServlet
entry, otherwise return
false
.boolean isErrorPagePresent()
true
if WEB-INF/web.xml
contains
a <error-page>
element.private void scanForFacesServlet(javax.servlet.ServletContext context)
Parse the web.xml for the current application and scan
for a FacesServlet entry, if found, set the
facesServletPresent
property to true.
context
- the ServletContext instance for this applicationprivate javax.xml.parsers.SAXParserFactory getConfiguredFactory()
Return a SAXParserFactory
instance that is
non-validating and is namespace aware.
SAXParserFactory
private void warnProcessingError(java.lang.Exception e, javax.servlet.ServletContext sc)
Copyright © 2002-2010 Oracle America, Inc. All Rights Reserved.