org.mortbay.jetty.webapp
Class WebXmlConfiguration

java.lang.Object
  extended by org.mortbay.jetty.webapp.WebXmlConfiguration
All Implemented Interfaces:
java.io.Serializable, Configuration
Direct Known Subclasses:
AbstractConfiguration

public class WebXmlConfiguration
extends java.lang.Object
implements Configuration

Configure by parsing default web.xml and web.xml

Author:
gregw
See Also:
Serialized Form

Field Summary
protected  java.lang.Object _constraintMappings
           
protected  WebAppContext _context
           
protected  boolean _defaultWelcomeFileList
           
protected  java.util.Map _errorPages
           
protected  java.lang.Object _filterMappings
           
protected  java.lang.Object _filters
           
protected  boolean _hasJSP
           
protected  java.lang.String _jspServletClass
           
protected  java.lang.String _jspServletName
           
protected  java.lang.Object _listeners
           
protected  ServletHandler _servletHandler
           
protected  java.lang.Object _servletMappings
           
protected  java.lang.Object _servlets
           
protected  int _version
           
protected  java.lang.Object _welcomeFiles
           
protected  XmlParser _xmlParser
           
 
Constructor Summary
WebXmlConfiguration()
           
 
Method Summary
 void configure(java.lang.String webXml)
           
 void configureClassLoader()
          Configure ClassPath.
 void configureDefaults()
          Configure Defaults.
 void configureWebApp()
          Configure WebApp.
 void deconfigureWebApp()
          DeConfigure WebApp.
protected  java.net.URL findWebXml()
           
protected  java.lang.String getJSPServletName()
           
 WebAppContext getWebAppContext()
          Get the context on which the configuration is performed.
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 initialize(XmlParser.Node config)
           
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(java.lang.String element, XmlParser.Node node)
          Handle web.xml element.
protected  void initWelcomeFileList(XmlParser.Node node)
           
protected  java.lang.Object newListenerInstance(java.lang.Class clazz)
           
protected  java.lang.String normalizePattern(java.lang.String p)
           
 void setWebAppContext(WebAppContext context)
          Set up a context on which to perform the configuration.
static XmlParser webXmlParser()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_context

protected WebAppContext _context

_xmlParser

protected XmlParser _xmlParser

_filters

protected java.lang.Object _filters

_filterMappings

protected java.lang.Object _filterMappings

_servlets

protected java.lang.Object _servlets

_servletMappings

protected java.lang.Object _servletMappings

_welcomeFiles

protected java.lang.Object _welcomeFiles

_constraintMappings

protected java.lang.Object _constraintMappings

_listeners

protected java.lang.Object _listeners

_errorPages

protected java.util.Map _errorPages

_hasJSP

protected boolean _hasJSP

_jspServletName

protected java.lang.String _jspServletName

_jspServletClass

protected java.lang.String _jspServletClass

_defaultWelcomeFileList

protected boolean _defaultWelcomeFileList

_servletHandler

protected ServletHandler _servletHandler

_version

protected int _version
Constructor Detail

WebXmlConfiguration

public WebXmlConfiguration()
Method Detail

webXmlParser

public static XmlParser webXmlParser()

setWebAppContext

public void setWebAppContext(WebAppContext context)
Description copied from interface: Configuration
Set up a context on which to perform the configuration.

Specified by:
setWebAppContext in interface Configuration

getWebAppContext

public WebAppContext getWebAppContext()
Description copied from interface: Configuration
Get the context on which the configuration is performed.

Specified by:
getWebAppContext in interface Configuration

configureClassLoader

public void configureClassLoader()
                          throws java.lang.Exception
Configure ClassPath.

Specified by:
configureClassLoader in interface Configuration
Throws:
java.lang.Exception

configureDefaults

public void configureDefaults()
                       throws java.lang.Exception
Description copied from interface: Configuration
Configure Defaults. This method is called to intialize the context to the containers default configuration. Typically this would mean application of the webdefault.xml file.

Specified by:
configureDefaults in interface Configuration
Throws:
java.lang.Exception

configureWebApp

public void configureWebApp()
                     throws java.lang.Exception
Description copied from interface: Configuration
Configure WebApp. This method is called to apply the standard and vendor deployment descriptors. Typically this is web.xml and jetty-web.xml.

Specified by:
configureWebApp in interface Configuration
Throws:
java.lang.Exception

findWebXml

protected java.net.URL findWebXml()
                           throws java.io.IOException,
                                  java.net.MalformedURLException
Throws:
java.io.IOException
java.net.MalformedURLException

configure

public void configure(java.lang.String webXml)
               throws java.lang.Exception
Throws:
java.lang.Exception

deconfigureWebApp

public void deconfigureWebApp()
                       throws java.lang.Exception
Description copied from interface: Configuration
DeConfigure WebApp. This method is called to undo all configuration done to this webapphandler. This is called to allow the context to work correctly over a stop/start cycle

Specified by:
deconfigureWebApp in interface Configuration
Throws:
java.lang.Exception

initialize

protected void initialize(XmlParser.Node config)
                   throws java.lang.ClassNotFoundException,
                          UnavailableException
Throws:
java.lang.ClassNotFoundException
UnavailableException

initWebXmlElement

protected void initWebXmlElement(java.lang.String element,
                                 XmlParser.Node node)
                          throws java.lang.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:
java.lang.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 java.lang.String normalizePattern(java.lang.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 java.lang.Object newListenerInstance(java.lang.Class clazz)
                                        throws java.lang.InstantiationException,
                                               java.lang.IllegalAccessException
Throws:
java.lang.InstantiationException
java.lang.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)

initSecurityRole

protected void initSecurityRole(XmlParser.Node node)

getJSPServletName

protected java.lang.String getJSPServletName()


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