org.eclipse.jetty.webapp
Class WebXmlProcessor

java.lang.Object
  extended by org.eclipse.jetty.webapp.WebXmlProcessor

public class WebXmlProcessor
extends Object

WebXmlProcessor


Nested Class Summary
 class WebXmlProcessor.Descriptor
           
 
Field Summary
protected  Object _constraintMappings
           
protected  WebAppContext _context
           
protected  boolean _defaultWelcomeFileList
           
protected  Map _errorPages
           
protected  Object _filterMappings
           
protected  Object _filters
           
protected  boolean _hasJSP
           
protected  String _jspServletClass
           
protected  String _jspServletName
           
protected  Object _listeners
           
protected  Set<String> _roles
           
protected  SecurityHandler _securityHandler
           
protected  ServletHandler _servletHandler
           
protected  Object _servletMappings
           
protected  Object _servlets
           
protected  WebXmlProcessor.Descriptor _webDefaultsRoot
           
protected  List<WebXmlProcessor.Descriptor> _webFragmentRoots
           
protected  WebXmlProcessor.Descriptor _webOverrideRoot
           
protected  WebXmlProcessor.Descriptor _webXmlRoot
           
protected  Object _welcomeFiles
           
protected  XmlParser _xmlParser
           
static String METADATA_COMPLETE
           
static String WEB_PROCESSOR
           
static String WEBXML_CLASSNAMES
           
static String WEBXML_VERSION
           
 
Constructor Summary
WebXmlProcessor(WebAppContext context)
           
 
Method Summary
 List<WebXmlProcessor.Descriptor> getFragments()
           
protected  String getJSPServletName()
           
 WebXmlProcessor.Descriptor getOverrideWeb()
           
 WebXmlProcessor.Descriptor getWebDefault()
           
 WebXmlProcessor.Descriptor getWebXml()
           
protected  void initContextParam(XmlParser.Node node)
           
protected  void initDisplayName(XmlParser.Node node)
           
protected  void initDistributable(XmlParser.Node node)
           
protected  void initErrorPage(XmlParser.Node node)
           
protected  void initFilter(XmlParser.Node node)
           
protected  void initFilterMapping(XmlParser.Node node)
           
protected  void initJspConfig(XmlParser.Node node)
           
protected  void initListener(XmlParser.Node node)
           
protected  void initLocaleEncodingList(XmlParser.Node node)
           
protected  void initLoginConfig(XmlParser.Node node)
           
protected  void initMimeConfig(XmlParser.Node node)
           
protected  void initSecurityConstraint(XmlParser.Node node)
           
protected  void initSecurityRole(XmlParser.Node node)
           
protected  void initServlet(XmlParser.Node node)
           
protected  void initServletMapping(XmlParser.Node node)
           
protected  void initSessionConfig(XmlParser.Node node)
           
protected  void initTagLib(XmlParser.Node node)
           
protected  void initWebXmlElement(String element, XmlParser.Node node)
          Handle web.xml element.
protected  void initWelcomeFileList(XmlParser.Node node)
           
protected  Object newListenerInstance(Class clazz)
           
protected  String normalizePattern(String p)
           
 void parseDefaults(Resource webDefaults)
           
 void parseFragment(Resource fragment)
           
 void parseOverride(Resource override)
           
 void parseWebXml(Resource webXml)
           
 void process(XmlParser.Node config)
           
 void processDefaults()
           
 void processFragments()
           
 void processOverride()
           
 void processWebXml()
           
protected static void redirect(XmlParser parser, String resource, URL source)
           
static XmlParser webXmlParser()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEB_PROCESSOR

public static final String WEB_PROCESSOR
See Also:
Constant Field Values

METADATA_COMPLETE

public static final String METADATA_COMPLETE
See Also:
Constant Field Values

WEBXML_VERSION

public static final String WEBXML_VERSION
See Also:
Constant Field Values

WEBXML_CLASSNAMES

public static final String WEBXML_CLASSNAMES
See Also:
Constant Field Values

_context

protected WebAppContext _context

_xmlParser

protected XmlParser _xmlParser

_webDefaultsRoot

protected WebXmlProcessor.Descriptor _webDefaultsRoot

_webXmlRoot

protected WebXmlProcessor.Descriptor _webXmlRoot

_webFragmentRoots

protected List<WebXmlProcessor.Descriptor> _webFragmentRoots

_webOverrideRoot

protected WebXmlProcessor.Descriptor _webOverrideRoot

_servletHandler

protected ServletHandler _servletHandler

_securityHandler

protected SecurityHandler _securityHandler

_filters

protected Object _filters

_filterMappings

protected Object _filterMappings

_servlets

protected Object _servlets

_servletMappings

protected Object _servletMappings

_listeners

protected Object _listeners

_welcomeFiles

protected Object _welcomeFiles

_roles

protected Set<String> _roles

_constraintMappings

protected Object _constraintMappings

_errorPages

protected Map _errorPages

_hasJSP

protected boolean _hasJSP

_jspServletName

protected String _jspServletName

_jspServletClass

protected String _jspServletClass

_defaultWelcomeFileList

protected boolean _defaultWelcomeFileList
Constructor Detail

WebXmlProcessor

public WebXmlProcessor(WebAppContext context)
                throws ClassNotFoundException
Throws:
ClassNotFoundException
Method Detail

webXmlParser

public static XmlParser webXmlParser()
                              throws ClassNotFoundException
Throws:
ClassNotFoundException

redirect

protected static void redirect(XmlParser parser,
                               String resource,
                               URL source)

parseDefaults

public void parseDefaults(Resource webDefaults)
                   throws Exception
Throws:
Exception

parseWebXml

public void parseWebXml(Resource webXml)
                 throws Exception
Throws:
Exception

parseFragment

public void parseFragment(Resource fragment)
                   throws Exception
Throws:
Exception

parseOverride

public void parseOverride(Resource override)
                   throws Exception
Throws:
Exception

processDefaults

public void processDefaults()
                     throws Exception
Throws:
Exception

processWebXml

public void processWebXml()
                   throws Exception
Throws:
Exception

processFragments

public void processFragments()
                      throws Exception
Throws:
Exception

processOverride

public void processOverride()
                     throws Exception
Throws:
Exception

getWebXml

public WebXmlProcessor.Descriptor getWebXml()

getOverrideWeb

public WebXmlProcessor.Descriptor getOverrideWeb()

getWebDefault

public WebXmlProcessor.Descriptor getWebDefault()

getFragments

public List<WebXmlProcessor.Descriptor> getFragments()

process

public void process(XmlParser.Node config)
             throws Exception
Throws:
Exception

initWebXmlElement

protected void initWebXmlElement(String element,
                                 XmlParser.Node node)
                          throws Exception
Handle web.xml element. This method is called for each top level element within the web.xml file. It may be specialized by derived WebAppHandlers to provide additional configuration and handling.

Parameters:
element - The element name
node - The node containing the element.
Throws:
Exception

initDisplayName

protected void initDisplayName(XmlParser.Node node)

initContextParam

protected void initContextParam(XmlParser.Node node)

initFilter

protected void initFilter(XmlParser.Node node)

initFilterMapping

protected void initFilterMapping(XmlParser.Node node)

normalizePattern

protected String normalizePattern(String p)

initServlet

protected void initServlet(XmlParser.Node node)

initServletMapping

protected void initServletMapping(XmlParser.Node node)

initListener

protected void initListener(XmlParser.Node node)

newListenerInstance

protected Object newListenerInstance(Class clazz)
                              throws InstantiationException,
                                     IllegalAccessException
Throws:
InstantiationException
IllegalAccessException

initDistributable

protected void initDistributable(XmlParser.Node node)

initSessionConfig

protected void initSessionConfig(XmlParser.Node node)

initMimeConfig

protected void initMimeConfig(XmlParser.Node node)

initWelcomeFileList

protected void initWelcomeFileList(XmlParser.Node node)

initLocaleEncodingList

protected void initLocaleEncodingList(XmlParser.Node node)

initErrorPage

protected void initErrorPage(XmlParser.Node node)

initTagLib

protected void initTagLib(XmlParser.Node node)

initJspConfig

protected void initJspConfig(XmlParser.Node node)

initSecurityConstraint

protected void initSecurityConstraint(XmlParser.Node node)

initLoginConfig

protected void initLoginConfig(XmlParser.Node node)
                        throws Exception
Throws:
Exception

initSecurityRole

protected void initSecurityRole(XmlParser.Node node)

getJSPServletName

protected String getJSPServletName()


Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.