Top Description Fields Constructors Methods
org.mortbay.jetty.webapp

public Class WebXmlConfiguration

extends Object
implements Configuration
Class Inheritance
All Implemented Interfaces
org.mortbay.jetty.webapp.Configuration, java.io.Serializable
Imports
java.io.File, .IOException, java.lang.reflect.Method, java.net.MalformedURLException, .URL, java.util.ArrayList, .EventListener, .HashMap, .Iterator, .Map, java.util.jar.JarEntry, java.util.regex.Pattern, javax.servlet.Servlet, .UnavailableException, org.mortbay.jetty.Authenticator, .Dispatcher, .Handler, .UserRealm, org.mortbay.jetty.handler.ContextHandler, org.mortbay.jetty.security.BasicAuthenticator, .Constraint, .ConstraintMapping, .DigestAuthenticator, .FormAuthenticator, org.mortbay.jetty.servlet.ErrorPageErrorHandler, .FilterHolder, .FilterMapping, .ServletHandler, .ServletHolder, .ServletMapping, org.mortbay.log.Log, org.mortbay.resource.Resource, org.mortbay.util.LazyList, .Loader, org.mortbay.xml.XmlParser

Configure by parsing default web.xml and web.xml
Author
gregw

Field Summary

Modifier and TypeField and Description
protected Object
protected WebAppContext
protected boolean
protected Map<K, V>
protected Object
protected Object
protected boolean
protected String
protected String
protected Object
protected boolean
protected ServletHandler
protected Object
protected Object
protected int
private URL
protected Object
protected XmlParser

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
configure(String webXml)

public void
public void
public void
public void
configureWebFragments()

Look for any web.xml fragments in META-INF of jars in WEB-INF/lib

public void
protected URL
protected String
public WebAppContext
getWebAppContext()

Implements org.mortbay.jetty.webapp.Configuration.getWebAppContext.

Get the context on which the configuration is performed.
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
initWebXmlElement(String
The element name
element
,
XmlParser.Node
The node containing the element.
node
)

Handle web.xml element.

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

public void
setWebAppContext(WebAppContext context)

Implements org.mortbay.jetty.webapp.Configuration.setWebAppContext.

Set up a context on which to perform the configuration.
public static XmlParser
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_constraintMappingsback to summary
protected Object _constraintMappings
_contextback to summary
protected WebAppContext _context
_defaultWelcomeFileListback to summary
protected boolean _defaultWelcomeFileList
_errorPagesback to summary
protected Map<K, V> _errorPages
_filterMappingsback to summary
protected Object _filterMappings
_filtersback to summary
protected Object _filters
_hasJSPback to summary
protected boolean _hasJSP
_jspServletClassback to summary
protected String _jspServletClass
_jspServletNameback to summary
protected String _jspServletName
_listenersback to summary
protected Object _listeners
_metaDataCompleteback to summary
protected boolean _metaDataComplete
_servletHandlerback to summary
protected ServletHandler _servletHandler
_servletMappingsback to summary
protected Object _servletMappings
_servletsback to summary
protected Object _servlets
_versionback to summary
protected int _version
_webxmlback to summary
private URL _webxml
_welcomeFilesback to summary
protected Object _welcomeFiles
_xmlParserback to summary
protected XmlParser _xmlParser

Constructor Detail

WebXmlConfigurationback to summary
public WebXmlConfiguration() throws ClassNotFoundException

Method Detail

configureback to summary
public void configure(String webXml) throws Exception
configureClassLoaderback to summary
public void configureClassLoader() throws Exception

Implements org.mortbay.jetty.webapp.Configuration.configureClassLoader.

Configure ClassPath.

configureDefaultsback to summary
public void configureDefaults() throws Exception

Implements org.mortbay.jetty.webapp.Configuration.configureDefaults.

Process webdefaults.xml

See Also
org.mortbay.jetty.webapp.Configuration#configureDefaults()
configureWebAppback to summary
public void configureWebApp() throws Exception

Implements org.mortbay.jetty.webapp.Configuration.configureWebApp.

Process web.xml

See Also
org.mortbay.jetty.webapp.Configuration#configureWebApp()
configureWebFragmentsback to summary
public void configureWebFragments() throws Exception

Look for any web.xml fragments in META-INF of jars in WEB-INF/lib

deconfigureWebAppback to summary
public void deconfigureWebApp() throws Exception

Implements org.mortbay.jetty.webapp.Configuration.deconfigureWebApp.

Doc from org.mortbay.jetty.webapp.Configuration.deconfigureWebApp.

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

findWebXmlback to summary
protected URL findWebXml() throws IOException, MalformedURLException
getJSPServletNameback to summary
protected String getJSPServletName()
getWebAppContextback to summary
public WebAppContext getWebAppContext()

Implements org.mortbay.jetty.webapp.Configuration.getWebAppContext.

Doc from org.mortbay.jetty.webapp.Configuration.getWebAppContext.

Get the context on which the configuration is performed.

initContextParamback to summary
protected void initContextParam(XmlParser.Node node)
initDisplayNameback to summary
protected void initDisplayName(XmlParser.Node node)
initDistributableback to summary
protected void initDistributable(XmlParser.Node node)
initErrorPageback to summary
protected void initErrorPage(XmlParser.Node node)
initFilterback to summary
protected void initFilter(XmlParser.Node node)
initFilterMappingback to summary
protected void initFilterMapping(XmlParser.Node node)
initializeback to summary
protected void initialize(XmlParser.Node config) throws ClassNotFoundException, UnavailableException
initializeVersionback to summary
protected void initializeVersion(XmlParser.Node config)
initJspConfigback to summary
protected void initJspConfig(XmlParser.Node node)
initListenerback to summary
protected void initListener(XmlParser.Node node)
initLocaleEncodingListback to summary
protected void initLocaleEncodingList(XmlParser.Node node)
initLoginConfigback to summary
protected void initLoginConfig(XmlParser.Node node) throws Exception
initMimeConfigback to summary
protected void initMimeConfig(XmlParser.Node node)
initSecurityConstraintback to summary
protected void initSecurityConstraint(XmlParser.Node node)
initSecurityRoleback to summary
protected void initSecurityRole(XmlParser.Node node)
initServletback to summary
protected void initServlet(XmlParser.Node node)
initServletMappingback to summary
protected void initServletMapping(XmlParser.Node node)
initSessionConfigback to summary
protected void initSessionConfig(XmlParser.Node node)
initTagLibback to summary
protected void initTagLib(XmlParser.Node node)
initWebXmlElementback to summary
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:String

The element name

node:XmlParser.Node

The node containing the element.

initWelcomeFileListback to summary
protected void initWelcomeFileList(XmlParser.Node node)
newListenerInstanceback to summary
protected Object newListenerInstance(Class<T> clazz) throws InstantiationException, IllegalAccessException
normalizePatternback to summary
protected String normalizePattern(String p)
redirectback to summary
private static void redirect(XmlParser parser, String resource, URL source)
setWebAppContextback to summary
public void setWebAppContext(WebAppContext context)

Implements org.mortbay.jetty.webapp.Configuration.setWebAppContext.

Doc from org.mortbay.jetty.webapp.Configuration.setWebAppContext.

Set up a context on which to perform the configuration.

webXmlParserback to summary
public static XmlParser webXmlParser() throws ClassNotFoundException