org.mortbay.jetty.plus
Class PlusWebAppContext

java.lang.Object
  extended byorg.mortbay.http.ResourceCache
      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:
java.io.Externalizable, HttpHandler, LifeCycle, java.io.Serializable

public class PlusWebAppContext
extends WebApplicationContext

See Also:
Serialized Form

Nested Class Summary
static class PlusWebAppContext.Configuration
           
 
Nested classes inherited from class org.mortbay.http.ResourceCache
ResourceCache.ResourceMetaData
 
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.
 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)
           
 void start()
          Start the Web Application.
 void stop()
          Stop the web application.
 
Methods inherited from class org.mortbay.jetty.servlet.WebApplicationContext
addEventListener, getConfiguration, getDefaultsDescriptor, getDisplayName, getErrorPage, getExtractWAR, getResource, getResourceAlias, getServletHandler, getWAR, getWebApplicationHandler, getWebInf, handle, isDistributable, isIgnoreWebJetty, readExternal, removeAttribute, removeErrorPage, removeEventListener, removeResourceAlias, setAttribute, setConfiguration, setDefaultsDescriptor, setDisplayName, setDistributable, setErrorPage, setExtractWAR, setIgnoreWebJetty, setPermissions, setResourceAlias, setWAR, toString, writeExternal
 
Methods inherited from class org.mortbay.jetty.servlet.ServletHttpContext
addLocaleEncoding, addServlet, addServlet, checkSecurityConstraints, getLocaleEncoding, getServletContext, sendError
 
Methods inherited from class org.mortbay.http.HttpContext
addClassPath, addClassPaths, addHandler, addHandler, addPermission, addSecurityConstraint, addVirtualHost, addWelcomeFile, canonicalContextPathSpec, clearSecurityConstraints, destroy, enterContextScope, flushCache, getAttribute, getAttributeNames, getAttributes, getAuthenticator, getClassLoader, getClassPath, getContextPath, getFileClassPath, getHandler, getHandlerIndex, getHandlers, getHosts, getHttpConnection, getHttpContext, getHttpContextName, getHttpServer, getInitParameter, getInitParameterNames, getName, getParentClassLoader, getPermissions, getRealm, getRealmName, getRequestLog, getRequests, getRequestsActive, getRequestsActiveMax, getResponses1xx, getResponses2xx, getResponses3xx, getResponses4xx, getResponses5xx, getStatsOn, getStatsOnMs, getTempDirectory, getVirtualHosts, getWelcomeFile, getWelcomeFiles, initialize, isClassLoaderJava2Compliant, isRedirectNullPath, isStarted, leaveContextScope, loadClass, log, removeHandler, removeHandler, removeVirtualHost, removeWelcomeFile, sendContextError, setAttributes, setAuthenticator, setClassLoader, setClassLoaderJava2Compliant, setClassPath, setContextPath, setHandlers, setHosts, setHttpContextName, setInitParameter, setParentClassLoader, setRealm, setRealmName, setRedirectNullPath, setRequestLog, setStatsOn, setTempDirectory, setVirtualHosts, setWelcomeFiles, statsReset, stop, toString
 
Methods inherited from class org.mortbay.http.ResourceCache
getBaseResource, getEncodingByMimeType, getEncodingMap, getMaxCachedFileSize, getMaxCacheSize, getMimeByExtension, getMimeMap, getResourceBase, getResourceMetaData, setBaseResource, setEncodingMap, setMaxCachedFileSize, setMaxCacheSize, setMimeMap, setMimeMapping, setResourceBase, setTypeEncoding
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

start

public void start()
           throws java.lang.Exception
Description copied from class: WebApplicationContext
Start the Web Application.

Specified by:
start in interface LifeCycle
Overrides:
start in class WebApplicationContext
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:
HttpException
java.io.IOException

stop

public void stop()
          throws java.lang.InterruptedException
Description copied from class: WebApplicationContext
Stop the web application. Handlers for resource, servlet, filter and security are removed as they are recreated and configured by any subsequent call to start().

Specified by:
stop in interface LifeCycle
Overrides:
stop in class WebApplicationContext
Throws:
java.lang.InterruptedException


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