org.mortbay.jetty.plus
Class PlusWebAppContext

java.lang.Object
  extended byorg.mortbay.util.Container
      extended byorg.mortbay.http.HttpContext
          extended byorg.mortbay.jetty.servlet.ServletHttpContext
              extended byorg.mortbay.jetty.servlet.WebApplicationContext
                  extended byorg.mortbay.jetty.plus.PlusWebAppContext
All Implemented Interfaces:
EventProvider, java.io.Externalizable, HttpHandler, LifeCycle, java.io.Serializable

public class PlusWebAppContext
extends WebApplicationContext

See Also:
Serialized Form

Nested Class Summary
static class PlusWebAppContext.Configuration
           
 
Field Summary
 
Fields inherited from class org.mortbay.http.HttpContext
__ErrorHandler, __fileClassPathAttr
 
Constructor Summary
PlusWebAppContext()
          Constructor.
PlusWebAppContext(java.lang.String webApp)
          Constructor.
 
Method Summary
 void addEnvEntry(java.lang.String name, java.lang.Object value)
          Add a java:comp/env entry.
 void doStart()
           
 void doStop()
           
 java.util.Map getENC()
          Get a mapping of java:comp/env bindings for this webapp context.
 java.lang.Object getEnvEntry(java.lang.String name)
           
 boolean getWebXmlEnvEntryOverride()
           
 void handle(HttpRequest request, HttpResponse response)
          Handler request.
 void setWebXmlEnvEntryOverride(boolean value)
           
 
Methods inherited from class org.mortbay.jetty.servlet.WebApplicationContext
addEventListener, destroy, getConfigurationClassNames, getConfigurations, getDefaultsDescriptor, getDisplayName, getErrorPage, getExtractWAR, getResource, getResourceAlias, getResourceAliases, getServletHandler, getWAR, getWebApplicationHandler, getWebInf, handle, isDistributable, isIgnoreWebJetty, 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, enterContextScope, getLocaleEncoding, getServletContext, sendError
 
Methods inherited from class org.mortbay.http.HttpContext
addClassPath, addClassPaths, addHandler, addHandler, addPermission, addSecurityConstraint, addVirtualHost, addWelcomeFile, canonicalContextPathSpec, clearSecurityConstraints, flushCache, getAttribute, getAttributeNames, getAttributes, getAuthenticator, getBaseResource, getClassLoader, getClassPath, getContextPath, getEncodingByMimeType, getEncodingMap, getFileClassPath, getHandler, getHandlerIndex, getHandlers, getHosts, getHttpConnection, getHttpContext, getHttpContextName, getHttpServer, getInitParameter, getInitParameterNames, getMaxCachedFileSize, getMaxCacheSize, getMimeByExtension, getMimeMap, getName, getParentClassLoader, getPermissions, getRealm, getRealmName, getRequestLog, getRequests, getRequestsActive, getRequestsActiveMax, getResourceBase, getResourceMetaData, getResponses1xx, getResponses2xx, getResponses3xx, getResponses4xx, getResponses5xx, getServerClasses, getStatsOn, getStatsOnMs, getStopGracefully, getSystemClasses, getTempDirectory, getVirtualHosts, getWelcomeFile, getWelcomeFiles, initialize, isClassLoaderJava2Compliant, isRedirectNullPath, leaveContextScope, loadClass, log, removeAttribute, removeHandler, removeHandler, removeVirtualHost, removeWelcomeFile, sendContextError, setAttribute, setAttributes, setAuthenticator, setBaseResource, setClassLoader, setClassLoaderJava2Compliant, setClassPath, setContextPath, setEncodingMap, setHandlers, setHosts, setHttpContextName, setInitParameter, setMaxCachedFileSize, setMaxCacheSize, setMimeMap, setMimeMapping, setParentClassLoader, setRealm, setRealmName, setRedirectNullPath, setRequestLog, setResourceBase, setServerClasses, setStatsOn, setStopGracefully, setSystemClasses, setTempDirectory, setTypeEncoding, setVirtualHosts, setWelcomeFiles, statsReset, stop, toString
 
Methods inherited from class org.mortbay.util.Container
getComponents, isStarted, start, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mortbay.util.LifeCycle
isStarted, start, stop
 

Constructor Detail

PlusWebAppContext

public PlusWebAppContext()
Constructor.

Throws:
java.io.IOException

PlusWebAppContext

public PlusWebAppContext(java.lang.String webApp)
Constructor.

Parameters:
webApp - The Web application directory or WAR file.
Throws:
java.io.IOException
Method Detail

setWebXmlEnvEntryOverride

public void setWebXmlEnvEntryOverride(boolean value)

getWebXmlEnvEntryOverride

public boolean getWebXmlEnvEntryOverride()

addEnvEntry

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


getEnvEntry

public java.lang.Object getEnvEntry(java.lang.String name)

getENC

public java.util.Map getENC()
                     throws javax.naming.NamingException
Get a mapping of java:comp/env bindings for this webapp context.

Returns:
flattened map of java:comp/env names to bound objects
Throws:
javax.naming.NamingException

doStart

public void doStart()
             throws java.lang.Exception
Throws:
java.lang.Exception

handle

public void handle(HttpRequest request,
                   HttpResponse response)
            throws HttpException,
                   java.io.IOException
Description copied from class: HttpContext
Handler request. Determine the path within the context and then call handle(pathInContext,request,response).

Overrides:
handle in class HttpContext
Parameters:
request -
response -
Returns:
True if the request has been handled.
Throws:
java.io.IOException
HttpException

doStop

public void doStop()
            throws java.lang.Exception
Throws:
java.lang.Exception


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