org.mortbay.jetty.plus
Class PlusWebAppContext

java.lang.Object
  |
  +--org.mortbay.http.HttpContext
        |
        +--org.mortbay.jetty.servlet.ServletHttpContext
              |
              +--org.mortbay.jetty.servlet.WebApplicationContext
                    |
                    +--org.mortbay.jetty.plus.PlusWebAppContext
All Implemented Interfaces:
java.io.Externalizable, LifeCycle, java.io.Serializable

public class PlusWebAppContext
extends WebApplicationContext

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.mortbay.http.HttpContext
HttpContext.ResourceMetaData
 
Field Summary
 
Fields inherited from class org.mortbay.http.HttpContext
__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()
           
 boolean 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, getDefaultsDescriptor, getDeploymentDescriptor, getDisplayName, getExtractWAR, getResource, getResourceAlias, getServletHandler, getTagLibMap, getWAR, getWebApplicationHandler, handle, isIgnoreWebJetty, readExternal, removeAttribute, removeEventListener, removeResourceAlias, setAttribute, setBaseResource, setClassPath, setDefaultsDescriptor, setExtractWAR, setIgnoreWebJetty, setPermissions, setResourceAlias, setResourceBase, setWAR, toString, writeExternal
 
Methods inherited from class org.mortbay.jetty.servlet.ServletHttpContext
addServlet, addServlet, checkSecurityConstraints, getServletContext, setDynamicServletPathSpec
 
Methods inherited from class org.mortbay.http.HttpContext
addHandler, addHandler, addPermission, addSecurityConstraint, addVirtualHost, addWelcomeFile, canonicalContextPathSpec, clearSecurityConstraints, destroy, flushCache, getAttribute, getAttributeNames, getAttributes, getAuthenticator, getBaseResource, getClassLoader, getClassPath, getContextPath, getEncodingByMimeType, getEncodingMap, getErrorPage, getFileClassPath, getHandler, getHandlerIndex, getHandlers, getHosts, getHttpConnection, getHttpContextName, getHttpServer, getInitParameter, getInitParameterNames, getMaxCachedFileSize, getMaxCacheSize, getMimeByExtension, getMimeMap, getParentClassLoader, getPermissions, getRealm, getRealmName, getRequestLog, getRequests, getRequestsActive, getRequestsActiveMax, getResourceBase, getResourceMetaData, getResponses1xx, getResponses2xx, getResponses3xx, getResponses4xx, getResponses5xx, getStatsOn, getStatsOnMs, getTempDirectory, getVirtualHosts, getWelcomeFile, getWelcomeFiles, isAuthConstrained, isClassLoaderJava2Compliant, isRedirectNullPath, isStarted, loadClass, log, removeErrorPage, removeHandler, removeHandler, removeVirtualHost, removeWelcomeFile, setAttributes, setAuthenticator, setClassLoader, setClassLoaderJava2Compliant, setClassPaths, setClassPaths, setContextPath, setEncodingMap, setErrorPage, setHandlers, setHosts, setInitParameter, setMaxCachedFileSize, setMaxCacheSize, setMimeMap, setMimeMapping, setParentClassLoader, setRealm, setRealmName, setRedirectNullPath, setRequestLog, setStatsOn, setTempDirectory, setTypeEncoding, setVirtualHosts, setWelcomeFiles, statsReset, stop, toString
 
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
java.lang.Exception

handle

public boolean 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

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 ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.