Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jetty.webapp
Class WebAppContext

    java.lang.Object
      org.eclipse.jetty.util.component.AbstractLifeCycle
          org.eclipse.jetty.server.handler.AbstractHandler
              org.eclipse.jetty.server.handler.AbstractHandlerContainer
                  org.eclipse.jetty.server.handler.HandlerWrapper
                      org.eclipse.jetty.server.handler.ScopedHandler
                          org.eclipse.jetty.server.handler.ContextHandler
                              org.eclipse.jetty.servlet.ServletContextHandler
                                  org.eclipse.jetty.webapp.WebAppContext

All Implemented Interfaces:
  Handler, HandlerContainer, Server.Graceful, Attributes, LifeCycle, WebAppClassLoader.Context

    public class WebAppContext

extends ServletContextHandler
implements WebAppClassLoader.Context

Web Application Context Handler. The WebAppContext handler is an extension of ContextHandler that coordinates the construction and configuration of nested handlers: `ConstraintSecurityHandler`, `SessionHandler` and `ServletHandler`. The handlers are configured by pluggable configuration classes, with the default being `WebXmlConfiguration` and `JettyWebXmlConfiguration`.

Nested Class Summary
`class` | `WebAppContext.Context`

Nested classes/interfaces inherited from class org.eclipse.jetty.servlet.ServletContextHandler
`ServletContextHandler.Decorator`

Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
`AbstractLifeCycle.AbstractLifeCycleListener`

Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
`LifeCycle.Listener`

Field Summary
`static java.lang.String[]` | `__dftServerClasses`
`static java.lang.String[]` | `__dftSystemClasses`
`static java.lang.String` | `BASETEMPDIR`
`static java.lang.String` | `ERROR_PAGE`
`static java.lang.String` | `SERVER_CONFIG`
`static java.lang.String` | `SERVER_SRV_CLASSES`
`static java.lang.String` | `SERVER_SYS_CLASSES`
`static java.lang.String` | `TEMPDIR`
`static java.lang.String` | `WEB_DEFAULTS_XML`

Fields inherited from class org.eclipse.jetty.servlet.ServletContextHandler
`_decorators, _defaultSecurityHandlerClass, _jspConfig, _options, _restrictedContextListeners, _securityHandler, _servletHandler, _sessionHandler, NO_SECURITY, NO_SESSIONS, SECURITY, SESSIONS`

Fields inherited from class org.eclipse.jetty.server.handler.ContextHandler
`_scontext, MANAGED_ATTRIBUTES`

Fields inherited from class org.eclipse.jetty.server.handler.ScopedHandler
`_nextScope, _outerScope`

Fields inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
`_handler`

Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
`_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING`

Constructor Summary
`WebAppContext()`
`WebAppContext(HandlerContainer parent, java.lang.String webApp, java.lang.String contextPath)`
`WebAppContext(SessionHandler sessionHandler, SecurityHandler securityHandler, ServletHandler servletHandler, ErrorHandler errorHandler)` This constructor is used in the geronimo integration.
`WebAppContext(java.lang.String webApp, java.lang.String contextPath)`
`WebAppContext(WebAppContext template)`

Method Summary
`void` | `addEventListener(java.util.EventListener listener)` Add EventListener Conveniance method that calls `setEventListeners(EventListener[])`
`void` | `addOverrideDescriptor(java.lang.String overrideDescriptor)` The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml
`void` | `addServerClass(java.lang.String classname)`
`void` | `addSystemClass(java.lang.String classname)`
`void` | `configure()`
`protected void` | `doStart()`
`protected void` | `doStop()`
`void` | `dumpUrl()`
`java.lang.String[]` | `getConfigurationClasses()`
`Configuration[]` | `getConfigurations()`
`static WebAppContext` | `getCurrentWebAppContext()`
`java.lang.String[]` | `getDefaultConfigurationClasses()`
`java.lang.String` | `getDefaultsDescriptor()` The default descriptor is a web.xml format file that is applied to the context before the standard WEB-INF/web.xml
`java.lang.String` | `getDescriptor()`
`java.lang.String` | `getExtraClasspath()`
`MetaData` | `getMetaData()`
`java.lang.String` | `getOverrideDescriptor()` Deprecated. use `getOverrideDescriptors()`
`java.util.List<java.lang.String>` | `getOverrideDescriptors()` An override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml
`java.security.PermissionCollection` | `getPermissions()`
`Resource` | `getResource(java.lang.String uriInContext)`
`java.lang.String` | `getResourceAlias(java.lang.String alias)`
`java.util.Map` | `getResourceAliases()`
`java.lang.String[]` | `getServerClasses()`
`java.lang.String[]` | `getSystemClasses()`
`java.io.File` | `getTempDirectory()`
`java.lang.Throwable` | `getUnavailableException()` Get an exception that caused the webapp to be unavailable
`java.lang.String` | `getWar()`
`Resource` | `getWebInf()`
`boolean` | `isAllowDuplicateFragmentNames()`
`boolean` | `isConfigurationDiscovered()` Is the context Automatically configured.
`boolean` | `isCopyWebDir()`
`boolean` | `isCopyWebInf()`
`boolean` | `isDistributable()`
`boolean` | `isExtractWAR()`
`boolean` | `isLogUrlOnStart()`
`boolean` | `isParentLoaderPriority()`
`protected boolean` | `isProtectedTarget(java.lang.String target)` Check the target.
`boolean` | `isServerClass(java.lang.String name)` Is the class a Server Class.
`boolean` | `isSystemClass(java.lang.String name)` Is the class a System Class.
`protected void` | `loadConfigurations()`
`protected void` | `loadSystemClasses()`
`void` | `postConfigure()`
`void` | `preConfigure()` Pre configure the web application.
`java.lang.String` | `removeResourceAlias(java.lang.String alias)`
`void` | `setAllowDuplicateFragmentNames(boolean allowDuplicateFragmentNames)`
`void` | `setClassLoader(java.lang.ClassLoader classLoader)`
`void` | `setConfigurationClasses(java.lang.String[] configurations)`
`void` | `setConfigurationDiscovered(boolean discovered)` Set the configuration discovery mode.
`void` | `setConfigurations(Configuration[] configurations)`
`void` | `setCopyWebDir(boolean copy)`
`void` | `setCopyWebInf(boolean copyWebInf)`
`void` | `setDefaultsDescriptor(java.lang.String defaultsDescriptor)` The default descriptor is a web.xml format file that is applied to the context before the standard WEB-INF/web.xml
`void` | `setDescriptor(java.lang.String descriptor)`
`void` | `setDisplayName(java.lang.String servletContextName)`
`void` | `setDistributable(boolean distributable)`
`void` | `setEventListeners(java.util.EventListener[] eventListeners)` Set the context event listeners.
`void` | `setExtraClasspath(java.lang.String extraClasspath)`
`void` | `setExtractWAR(boolean extractWAR)`
`void` | `setLogUrlOnStart(boolean logOnStart)` Sets whether or not the web app name and URL is logged on startup
`void` | `setOverrideDescriptor(java.lang.String overrideDescriptor)` Deprecated. use `setOverrideDescriptors(List)`
`void` | `setOverrideDescriptors(java.util.List<java.lang.String> overrideDescriptors)` The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml
`void` | `setParentLoaderPriority(boolean java2compliant)`
`void` | `setPermissions(java.security.PermissionCollection permissions)`
`void` | `setResourceAlias(java.lang.String alias, java.lang.String uri)` Set Resource Alias.
`void` | `setResourceAliases(java.util.Map map)`
`void` | `setServer(Server server)`
`void` | `setServerClasses(java.lang.String[] serverClasses)` Set the server classes patterns.
`void` | `setSystemClasses(java.lang.String[] systemClasses)` Set the system classes patterns.
`void` | `setTempDirectory(java.io.File dir)` Set temporary directory for context.
`void` | `setTemplate(WebAppContext template)` Configure this WebAppContext from a shared WebAppContext as template.
`void` | `setWar(java.lang.String war)`
`protected void` | `startContext()` Finish constructing handlers and link them together.
`java.lang.String` | `toString()`

Methods inherited from class org.eclipse.jetty.servlet.ServletContextHandler
`addDecorator, addFilter, addFilter, addFilter, addRoles, addServlet, addServlet, addServlet, callContextDestroyed, callContextInitialized, dynamicHolderAdded, getDecorators, getDefaultSecurityHandlerClass, getSecurityHandler, getServletHandler, getSessionHandler, isRestrictListeners, newSecurityHandler, newServletHandler, newSessionHandler, restrictEventListener, setDecorators, setDefaultSecurityHandlerClass, setRestrictListeners, setSecurityHandler, setServletHandler, setServletSecurity, setSessionHandler`

Methods inherited from class org.eclipse.jetty.server.handler.ContextHandler
`addLocaleEncoding, checkContext, checkManagedAttribute, clearAttributes, doHandle, doScope, dump, getAllowNullPathInfo, getAttribute, getAttributeNames, getAttributes, getBaseResource, getClassLoader, getClassPath, getConnectorNames, getContextPath, getCurrentContext, getDisplayName, getErrorHandler, getEventListeners, getInitParameter, getInitParameterNames, getInitParams, getLocaleEncoding, getLocaleEncoding, getLogger, getMaxFormContentSize, getMimeTypes, getResourceBase, getResourcePaths, getServletContext, getVirtualHosts, getWelcomeFiles, handle, isAliases, isAvailable, isCompactPath, isShutdown, loadClass, newResource, newResource, removeAttribute, setAliases, setAllowNullPathInfo, setAttribute, setAttributes, setAvailable, setBaseResource, setCompactPath, setConnectorNames, setContextPath, setErrorHandler, setLogger, setManagedAttribute, setMaxFormContentSize, setMimeTypes, setResourceBase, setShutdown, setVirtualHosts, setWelcomeFiles`

Methods inherited from class org.eclipse.jetty.server.handler.ScopedHandler
`handle, never, nextHandle, nextScope`

Methods inherited from class org.eclipse.jetty.server.handler.HandlerWrapper
`expandChildren, getHandler, getHandlers, getNestedHandlerByClass, setHandler`

Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandlerContainer
`dumpHandlers, expandHandler, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass`

Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler
`destroy, dump, dump, getServer`

Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
`addLifeCycleListener, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.eclipse.jetty.webapp.WebAppClassLoader.Context
`newResource`

Methods inherited from interface org.eclipse.jetty.server.Handler
`destroy, getServer, handle`

Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
`addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

Field Detail

### TEMPDIR

    public static final java.lang.String TEMPDIR

See Also:
  Constant Field Values

### BASETEMPDIR

    public static final java.lang.String BASETEMPDIR

See Also:
  Constant Field Values

### WEB_DEFAULTS_XML

    public static final java.lang.String WEB_DEFAULTS_XML

See Also:
  Constant Field Values

### ERROR_PAGE

    public static final java.lang.String ERROR_PAGE

See Also:
  Constant Field Values

### SERVER_CONFIG

    public static final java.lang.String SERVER_CONFIG

See Also:
  Constant Field Values

### SERVER_SYS_CLASSES

    public static final java.lang.String SERVER_SYS_CLASSES

See Also:
  Constant Field Values

### SERVER_SRV_CLASSES

    public static final java.lang.String SERVER_SRV_CLASSES

See Also:
  Constant Field Values

### __dftSystemClasses

    public static final java.lang.String[] __dftSystemClasses

### __dftServerClasses

    public static final java.lang.String[] __dftServerClasses

Constructor Detail

### WebAppContext

    public WebAppContext()

### WebAppContext

    public WebAppContext(WebAppContext template)
                  throws java.io.IOException

Throws:
  `java.io.IOException`

### WebAppContext

    public WebAppContext(java.lang.String webApp,
                         java.lang.String contextPath)

Parameters:
  `contextPath` - The context path
  `webApp` - The URL or filename of the webapp directory or war file.

### WebAppContext

    public WebAppContext(HandlerContainer parent,
                         java.lang.String webApp,
                         java.lang.String contextPath)

Parameters:
  `parent` - The parent HandlerContainer.
  `contextPath` - The context path
  `webApp` - The URL or filename of the webapp directory or war file.

### WebAppContext

    public WebAppContext(SessionHandler sessionHandler,
                         SecurityHandler securityHandler,
                         ServletHandler servletHandler,
                         ErrorHandler errorHandler)

  This constructor is used in the geronimo integration.

  Parameters:
    `sessionHandler` - SessionHandler for this web app
    `securityHandler` - SecurityHandler for this web app
    `servletHandler` - ServletHandler for this web app
    `errorHandler` - ErrorHandler for this web app

Method Detail

### getCurrentWebAppContext

    public static WebAppContext getCurrentWebAppContext()

### setTemplate

    public void setTemplate(WebAppContext template)

  Configure this WebAppContext from a shared WebAppContext as template.

  The MetaData is reused from the template.

  Parameters:
    `template` - The template to base this webappcontext on

### setDisplayName

    public void setDisplayName(java.lang.String servletContextName)

  Overrides:
    `setDisplayName` in class `ContextHandler`
  Parameters:
    `servletContextName` - The servletContextName to set.

### getUnavailableException

    public java.lang.Throwable getUnavailableException()

  Get an exception that caused the webapp to be unavailable

  Returns:
    A throwable if the webapp is unavailable or null

### setResourceAlias

    public void setResourceAlias(java.lang.String alias,
                                 java.lang.String uri)

  Set Resource Alias. Resource aliases map resource uri's within a context. They may optionally be used by a handler when looking for a resource.

  Parameters:
    `alias` -
    `uri` -

### getResourceAliases

    public java.util.Map getResourceAliases()

### setResourceAliases

    public void setResourceAliases(java.util.Map map)

### getResourceAlias

    public java.lang.String getResourceAlias(java.lang.String alias)

### removeResourceAlias

    public java.lang.String removeResourceAlias(java.lang.String alias)

### setClassLoader

    public void setClassLoader(java.lang.ClassLoader classLoader)

  Overrides:
    `setClassLoader` in class `ContextHandler`
  Parameters:
    `classLoader` - The classLoader to set.

### getResource

    public Resource getResource(java.lang.String uriInContext)
                         throws java.net.MalformedURLException

  Overrides:
    `getResource` in class `ContextHandler`
  Throws:
    `java.net.MalformedURLException`

### isConfigurationDiscovered

    public boolean isConfigurationDiscovered()

  Is the context Automatically configured.

  Returns:
    true if configuration discovery.

### setConfigurationDiscovered

    public void setConfigurationDiscovered(boolean discovered)

  Set the configuration discovery mode. If configuration discovery is set to true, then the JSR315 servlet 3.0 discovered configuration features are enabled. These are:
  - Web Fragments
  - META-INF/resource directories

  Parameters:
    `discovered` - true if configuration discovery is enabled for automatic configuration from the context

### preConfigure

    public void preConfigure()
                      throws java.lang.Exception

  Pre configure the web application.

  The method is normally called from `AbstractLifeCycle.start()`. It performs the discovery of the configurations to be applied to this context, specifically:

  - Instantiate the `Configuration` instances with a call to `loadConfigurations()`.
  - Setup the default System classes by calling `loadSystemClasses()`
  - Setup the default Server classes by calling `loadServerClasses()`
  - Instantiates a classload (if one is not already set)
  - Calls the `Configuration.preConfigure(WebAppContext)` method of all Configuration instances.

  Throws:
    `java.lang.Exception`

### configure

    public void configure()
                   throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### postConfigure

    public void postConfigure()
                       throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### doStart

    protected void doStart()
                    throws java.lang.Exception

  Overrides:
    `doStart` in class `ContextHandler`
  Throws:
    `java.lang.Exception`
  See Also:
    `HandlerWrapper.doStart()`

### dumpUrl

    public void dumpUrl()

### doStop

    protected void doStop()
                   throws java.lang.Exception

  Overrides:
    `doStop` in class `ServletContextHandler`
  Throws:
    `java.lang.Exception`
  See Also:
    `ContextHandler.doStop()`

### getConfigurationClasses

    public java.lang.String[] getConfigurationClasses()

  Returns:
    Returns the configurations.

### getConfigurations

    public Configuration[] getConfigurations()

  Returns:
    Returns the configurations.

### getDefaultsDescriptor

    public java.lang.String getDefaultsDescriptor()

  The default descriptor is a web.xml format file that is applied to the context before the standard WEB-INF/web.xml

  Returns:
    Returns the defaultsDescriptor.

### getOverrideDescriptor

    public java.lang.String getOverrideDescriptor()

  Deprecated. use `getOverrideDescriptors()`

  The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml

  Returns:
    Returns the Override Descriptor.

### getOverrideDescriptors

    public java.util.List<java.lang.String> getOverrideDescriptors()

  An override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml

  Returns:
    Returns the Override Descriptor list

### getPermissions

    public java.security.PermissionCollection getPermissions()

  Specified by:
    `getPermissions` in interface `WebAppClassLoader.Context`
  Returns:
    Returns the permissions.

### getServerClasses

    public java.lang.String[] getServerClasses()

  Returns:
    Returns the serverClasses.
  See Also:
    `setServerClasses(String[])`

### addServerClass

    public void addServerClass(java.lang.String classname)

### getSystemClasses

    public java.lang.String[] getSystemClasses()

  Returns:
    Returns the systemClasses.
  See Also:
    `setSystemClasses(String[])`

### addSystemClass

    public void addSystemClass(java.lang.String classname)

### isServerClass

    public boolean isServerClass(java.lang.String name)

  Description copied from interface: `WebAppClassLoader.Context`
  Is the class a Server Class. A Server class is a class that is part of the implementation of the server and is NIT visible to a webapplication. The web application may provide it's own implementation of the class, to be loaded from WEB-INF/lib or WEB-INF/classes

  Specified by:
    `isServerClass` in interface `WebAppClassLoader.Context`
  Parameters:
    `name` - The fully qualified name of the class.
  Returns:
    True if the class is a server class.

### isSystemClass

    public boolean isSystemClass(java.lang.String name)

  Description copied from interface: `WebAppClassLoader.Context`
  Is the class a System Class. A System class is a class that is visible to a webapplication, but that cannot be overridden by the contents of WEB-INF/lib or WEB-INF/classes

  Specified by:
    `isSystemClass` in interface `WebAppClassLoader.Context`
  Parameters:
    `name` - The fully qualified name of the class.
  Returns:
    True if the class is a system class.

### loadSystemClasses

    protected void loadSystemClasses()

### getWar

    public java.lang.String getWar()

  Returns:
    Returns the war as a file or URL string (Resource)

### getWebInf

    public Resource getWebInf()
                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### isDistributable

    public boolean isDistributable()

  Returns:
    Returns the distributable.

### isExtractWAR

    public boolean isExtractWAR()

  Returns:
    Returns the extractWAR.

### isCopyWebDir

    public boolean isCopyWebDir()

  Returns:
    True if the webdir is copied (to allow hot replacement of jars on windows)

### isCopyWebInf

    public boolean isCopyWebInf()

  Returns:
    True if the web-inf lib and classes directories are copied (to allow hot replacement of jars on windows)

### isParentLoaderPriority

    public boolean isParentLoaderPriority()

  Specified by:
    `isParentLoaderPriority` in interface `WebAppClassLoader.Context`
  Returns:
    True if the classloader should delegate first to the parent classloader (standard java behaviour) or false if the classloader should first try to load from WEB-INF/lib or WEB-INF/classes (servlet spec recommendation).

### getDefaultConfigurationClasses

    public java.lang.String[] getDefaultConfigurationClasses()

### loadConfigurations

    protected void loadConfigurations()
                               throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### isProtectedTarget

    protected boolean isProtectedTarget(java.lang.String target)

  Description copied from class: `ContextHandler`
  Check the target. Called by `ScopedHandler.handle(String, Request, HttpServletRequest, HttpServletResponse)` when a target within a context is determined. If the target is protected, 404 is returned. The default implementation always returns false.

  Overrides:
    `isProtectedTarget` in class `ContextHandler`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `ContextHandler`

### setConfigurationClasses

    public void setConfigurationClasses(java.lang.String[] configurations)

  Parameters:
    `configurations` - The configuration class names. If setConfigurations is not called these classes are used to create a configurations array.

### setConfigurations

    public void setConfigurations(Configuration[] configurations)

  Parameters:
    `configurations` - The configurations to set.

### setDefaultsDescriptor

    public void setDefaultsDescriptor(java.lang.String defaultsDescriptor)

  The default descriptor is a web.xml format file that is applied to the context before the standard WEB-INF/web.xml

  Parameters:
    `defaultsDescriptor` - The defaultsDescriptor to set.

### setOverrideDescriptor

    public void setOverrideDescriptor(java.lang.String overrideDescriptor)

  Deprecated. use `setOverrideDescriptors(List)`

  The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml

  Parameters:
    `overrideDescriptor` - The overrideDescritpor to set.

### setOverrideDescriptors

    public void setOverrideDescriptors(java.util.List<java.lang.String> overrideDescriptors)

  The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml

  Parameters:
    `overrideDescriptor` - The overrideDescriptors (file or URL) to set.

### addOverrideDescriptor

    public void addOverrideDescriptor(java.lang.String overrideDescriptor)

  The override descriptor is a web.xml format file that is applied to the context after the standard WEB-INF/web.xml

  Parameters:
    `overrideDescriptor` - The overrideDescriptor (file or URL) to add.

### getDescriptor

    public java.lang.String getDescriptor()

  Returns:
    the web.xml descriptor to use. If set to null, WEB-INF/web.xml is used if it exists.

### setDescriptor

    public void setDescriptor(java.lang.String descriptor)

  Parameters:
    `descriptor` - the web.xml descriptor to use. If set to null, WEB-INF/web.xml is used if it exists.

### setDistributable

    public void setDistributable(boolean distributable)

  Parameters:
    `distributable` - The distributable to set.

### setEventListeners

    public void setEventListeners(java.util.EventListener[] eventListeners)

  Description copied from class: `ContextHandler`
  Set the context event listeners.

  Overrides:
    `setEventListeners` in class `ContextHandler`
  Parameters:
    `eventListeners` - the event listeners
  See Also:
    `ServletContextListener`, `ServletContextAttributeListener`, `ServletRequestListener`, `ServletRequestAttributeListener`

### addEventListener

    public void addEventListener(java.util.EventListener listener)

  Add EventListener Conveniance method that calls `setEventListeners(EventListener[])`

  Overrides:
    `addEventListener` in class `ContextHandler`
  Parameters:
    `listener` -
  See Also:
    `ServletContextListener`, `ServletContextAttributeListener`, `ServletRequestListener`, `ServletRequestAttributeListener`

### setExtractWAR

    public void setExtractWAR(boolean extractWAR)

  Parameters:
    `extractWAR` - True if war files are extracted

### setCopyWebDir

    public void setCopyWebDir(boolean copy)

  Parameters:
    `copy` - True if the webdir is copied (to allow hot replacement of jars)

### setCopyWebInf

    public void setCopyWebInf(boolean copyWebInf)

  Parameters:
    `copyWebInf` - True if the web-inf lib and classes directories are copied (to allow hot replacement of jars on windows)

### setParentLoaderPriority

    public void setParentLoaderPriority(boolean java2compliant)

  Parameters:
    `java2compliant` - The java2compliant to set.

### setPermissions

    public void setPermissions(java.security.PermissionCollection permissions)

  Parameters:
    `permissions` - The permissions to set.

### setServerClasses

    public void setServerClasses(java.lang.String[] serverClasses)

  Set the server classes patterns.

  Server classes/packages are classes used to implement the server and are hidden from the context. If the context needs to load these classes, it must have its own copy of them in WEB-INF/lib or WEB-INF/classes. A class pattern is a string of one of the forms:

  org.package.Classname
    Match a specific class
  org.package.
    Match a specific package hierarchy
  -org.package.Classname
    Exclude a specific class
  -org.package.
    Exclude a specific package hierarchy

  Parameters:
    `serverClasses` - The serverClasses to set.

### setSystemClasses

    public void setSystemClasses(java.lang.String[] systemClasses)

  Set the system classes patterns.

  System classes/packages are classes provided by the JVM and that cannot be replaced by classes of the same name from WEB-INF, regardless of the value of `setParentLoaderPriority(boolean)`. A class pattern is a string of one of the forms:

  org.package.Classname
    Match a specific class
  org.package.
    Match a specific package hierarchy
  -org.package.Classname
    Exclude a specific class
  -org.package.
    Exclude a specific package hierarchy

  Parameters:
    `systemClasses` - The systemClasses to set.

### setTempDirectory

    public void setTempDirectory(java.io.File dir)

  Set temporary directory for context. The javax.servlet.context.tempdir attribute is also set.

  Parameters:
    `dir` - Writable temporary directory.

### getTempDirectory

    public java.io.File getTempDirectory()

### setWar

    public void setWar(java.lang.String war)

  Parameters:
    `war` - The war to set as a file name or URL

### getExtraClasspath

    public java.lang.String getExtraClasspath()

  Specified by:
    `getExtraClasspath` in interface `WebAppClassLoader.Context`
  Returns:
    Comma or semicolon separated path of filenames or URLs pointing to directories or jar files. Directories should end with '/'.

### setExtraClasspath

    public void setExtraClasspath(java.lang.String extraClasspath)

  Parameters:
    `extraClasspath` - Comma or semicolon separated path of filenames or URLs pointing to directories or jar files. Directories should end with '/'.

### isLogUrlOnStart

    public boolean isLogUrlOnStart()

### setLogUrlOnStart

    public void setLogUrlOnStart(boolean logOnStart)

  Sets whether or not the web app name and URL is logged on startup

  Parameters:
    `logOnStart` - whether or not the log message is created

### setServer

    public void setServer(Server server)

  Specified by:
    `setServer` in interface `Handler`
  Overrides:
    `setServer` in class `ContextHandler`

### isAllowDuplicateFragmentNames

    public boolean isAllowDuplicateFragmentNames()

### setAllowDuplicateFragmentNames

    public void setAllowDuplicateFragmentNames(boolean allowDuplicateFragmentNames)

### startContext

    protected void startContext()
                         throws java.lang.Exception

  Description copied from class: `ServletContextHandler`
  Finish constructing handlers and link them together.

  Overrides:
    `startContext` in class `ServletContextHandler`
  Throws:
    `java.lang.Exception`
  See Also:
    `ContextHandler.startContext()`

### getMetaData

    public MetaData getMetaData()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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