org.mortbay.jetty.plus

Class PlusWebAppContext

Implemented Interfaces:
Externalizable, EventProvider, HttpHandler, LifeCycle, Serializable

public class PlusWebAppContext
extends WebApplicationContext

Nested Class Summary

static class
PlusWebAppContext.Configuration

Nested classes/interfaces inherited from class org.mortbay.jetty.servlet.WebApplicationContext

WebApplicationContext.Configuration

Field Summary

Fields inherited from class org.mortbay.http.HttpContext

__ErrorHandler, __fileClassPathAttr

Constructor Summary

PlusWebAppContext()
Constructor.
PlusWebAppContext(String webApp)
Constructor.

Method Summary

void
addEnvEntry(String name, Object value)
Add a java:comp/env entry.
void
doStart()
void
doStop()
Map
getENC()
Get a mapping of java:comp/env bindings for this webapp context.
Object
getEnvEntry(String name)
boolean
getWebXmlEnvEntryOverride()
void
handle(HttpRequest request, HttpResponse response)
protected void
initClassLoader(boolean forceContextLoader)
protected void
initialize()
void
setWebXmlEnvEntryOverride(boolean value)

Methods inherited from class org.mortbay.jetty.servlet.WebApplicationContext

addEventListener, configureClassPath, configureDefaults, configureWebApp, destroy, doStart, doStop, getConfigurationClassNames, getConfigurations, getDefaultsDescriptor, getDisplayName, getErrorPage, getExtractWAR, getResource, getResourceAlias, getResourceAliases, getServletHandler, getUserRealm, getWAR, getWebApplicationHandler, getWebInf, handle, initialize, isDistributable, isIgnoreWebJetty, loadConfigurations, readExternal, removeErrorPage, removeEventListener, removeResourceAlias, setConfigurationClassNames, setDefaultsDescriptor, setDisplayName, setDistributable, setErrorPage, setExtractWAR, setIgnoreWebJetty, setPermissions, setResourceAlias, setWAR, toString, writeExternal

Methods inherited from class org.mortbay.jetty.servlet.ServletHttpContext

addLocaleEncoding, addServlet, addServlet, checkSecurityConstraints, destroy, doStop, enterContextScope, getLocaleEncoding, getServletContext, getServletHandler, jSecurityCheck, sendError, toString

Methods inherited from class org.mortbay.http.HttpContext

addClassPath, addClassPaths, addHandler, addHandler, addPermission, addSecurityConstraint, addVirtualHost, addWelcomeFile, canonicalContextPathSpec, checkSecurityConstraints, clearSecurityConstraints, destroy, doStart, doStop, enterContextScope, flushCache, getAttribute, getAttributeNames, getAttributes, getAuthenticator, getBaseResource, getClassLoader, getClassPath, getContextPath, getEncodingByMimeType, getEncodingMap, getFileClassPath, getHandler, getHandlerIndex, getHandlers, getHosts, getHttpConnection, getHttpContext, getHttpContextName, getHttpServer, getInitParameter, getInitParameterNames, getMaxCacheSize, getMaxCachedFileSize, getMimeByExtension, getMimeMap, getName, getParentClassLoader, getPermissions, getRealm, getRealmName, getRequestLog, getRequests, getRequestsActive, getRequestsActiveMax, getResource, getResourceBase, getResourceMetaData, getResponses1xx, getResponses2xx, getResponses3xx, getResponses4xx, getResponses5xx, getServerClasses, getStatsOn, getStatsOnMs, getStopGracefully, getSystemClasses, getTempDirectory, getVirtualHosts, getWelcomeFile, getWelcomeFiles, handle, handle, initClassLoader, initialize, isClassLoaderJava2Compliant, isRedirectNullPath, leaveContextScope, loadClass, log, removeAttribute, removeHandler, removeHandler, removeVirtualHost, removeWelcomeFile, sendContextError, sendError, setAttribute, setAttributes, setAuthenticator, setBaseResource, setClassLoader, setClassLoaderJava2Compliant, setClassPath, setContextPath, setEncodingMap, setHandlers, setHosts, setHttpContextName, setInitParameter, setMaxCacheSize, setMaxCachedFileSize, setMimeMap, setMimeMapping, setParentClassLoader, setPermissions, setRealm, setRealmName, setRedirectNullPath, setRequestLog, setResourceBase, setServerClasses, setStatsOn, setStopGracefully, setSystemClasses, setTempDirectory, setTypeEncoding, setVirtualHosts, setWelcomeFiles, startHandlers, statsReset, stop, toString, toString

Methods inherited from class org.mortbay.util.Container

addComponent, addEventListener, destroy, doStart, doStop, getComponents, isStarted, isStarting, isStopping, removeComponent, removeEventListener, start, stop

Constructor Details

PlusWebAppContext

public PlusWebAppContext()
Constructor.

PlusWebAppContext

public PlusWebAppContext(String webApp)
Constructor.
Parameters:
webApp - The Web application directory or WAR file.

Method Details

addEnvEntry

public void addEnvEntry(String name,
                        Object value)
Add a java:comp/env entry. Values must be serializable to be stored!

doStart

public void doStart()
            throws Exception
Overrides:
doStart in interface WebApplicationContext

doStop

public void doStop()
            throws Exception
Overrides:
doStop in interface WebApplicationContext

getENC

public Map getENC()
            throws NamingException
Get a mapping of java:comp/env bindings for this webapp context.
Returns:
flattened map of java:comp/env names to bound objects

getEnvEntry

public Object getEnvEntry(String name)

getWebXmlEnvEntryOverride

public boolean getWebXmlEnvEntryOverride()

handle

public void handle(HttpRequest request,
                   HttpResponse response)
            throws HttpException,
                   IOException
Overrides:
handle in interface HttpContext

initClassLoader

protected void initClassLoader(boolean forceContextLoader)
            throws MalformedURLException,
                   IOException
Overrides:
initClassLoader in interface HttpContext

initialize

protected void initialize()
            throws Exception
Overrides:
initialize in interface WebApplicationContext

setWebXmlEnvEntryOverride

public void setWebXmlEnvEntryOverride(boolean value)

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.