|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mortbay.http.ResourceCache
org.mortbay.http.HttpContext
org.mortbay.jetty.servlet.ServletHttpContext
org.mortbay.jetty.servlet.WebApplicationContext
Standard web.xml configured HttpContext. This specialization of HttpContext uses the standardized web.xml to describe a web application and configure the handlers for the HttpContext. If a file named web-jetty.xml or jetty-web.xml is found in the WEB-INF directory it is applied to the context using the XmlConfiguration format. A single WebApplicationHandler instance is used to provide security, filter, sevlet and resource handling.
WebApplicationHandler
,
Serialized FormNested Class Summary | |
static class |
WebApplicationContext.Configuration
Base Class for WebApplicationContext 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 | |
WebApplicationContext()
Constructor. |
|
WebApplicationContext(java.lang.String webApp)
Constructor. |
Method Summary | |
void |
addEventListener(java.util.EventListener listener)
|
WebApplicationContext.Configuration |
getConfiguration()
|
java.lang.String |
getDefaultsDescriptor()
|
java.lang.String |
getDisplayName()
|
java.lang.String |
getErrorPage(java.lang.String error)
get error page URI. |
boolean |
getExtractWAR()
|
Resource |
getResource(java.lang.String uriInContext)
Get a resource from the context. |
java.lang.String |
getResourceAlias(java.lang.String alias)
|
ServletHandler |
getServletHandler()
Get the context ServletHandler. |
java.lang.String |
getWAR()
|
WebApplicationHandler |
getWebApplicationHandler()
|
Resource |
getWebInf()
|
void |
handle(java.lang.String pathInContext,
java.lang.String pathParams,
HttpRequest httpRequest,
HttpResponse httpResponse)
Handler request. |
boolean |
isDistributable()
|
boolean |
isIgnoreWebJetty()
|
void |
readExternal(java.io.ObjectInput in)
|
void |
removeAttribute(java.lang.String name)
|
java.lang.String |
removeErrorPage(java.lang.String error)
|
void |
removeEventListener(java.util.EventListener listener)
|
java.lang.String |
removeResourceAlias(java.lang.String alias)
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Set a context attribute. |
void |
setConfiguration(WebApplicationContext.Configuration configuration)
|
void |
setDefaultsDescriptor(java.lang.String defaults)
Set the defaults web.xml file. |
void |
setDisplayName(java.lang.String name)
|
void |
setDistributable(boolean distributable)
|
void |
setErrorPage(java.lang.String error,
java.lang.String uriInContext)
set error page URI. |
void |
setExtractWAR(boolean extract)
|
void |
setIgnoreWebJetty(boolean b)
|
void |
setPermissions(java.security.PermissionCollection permissions)
Set the permissions to be used for this context. |
void |
setResourceAlias(java.lang.String alias,
java.lang.String uri)
Set Resource Alias. |
void |
setWAR(java.lang.String war)
|
void |
start()
Start the Web Application. |
void |
stop()
Stop the web application. |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class org.mortbay.jetty.servlet.ServletHttpContext |
addLocaleEncoding, addServlet, addServlet, checkSecurityConstraints, getLocaleEncoding, getServletContext, sendError |
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 |
public WebApplicationContext()
public WebApplicationContext(java.lang.String webApp)
webApp
- The Web application directory or WAR file.Method Detail |
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void setConfiguration(WebApplicationContext.Configuration configuration)
public WebApplicationContext.Configuration getConfiguration()
public void setWAR(java.lang.String war)
war
- Filename or URL of the web application directory or WAR file.public java.lang.String getWAR()
public WebApplicationHandler getWebApplicationHandler()
public Resource getWebInf() throws java.io.IOException
java.io.IOException
public ServletHandler getServletHandler()
getServletHandler
in class ServletHttpContext
public void setPermissions(java.security.PermissionCollection permissions)
HttpContext
setPermissions
in class HttpContext
permissions
- public boolean isIgnoreWebJetty()
public void setIgnoreWebJetty(boolean b)
b
- If TRUE, web-jetty.xml and jetty-web.xml configuration
files are ignored.public boolean isDistributable()
public void setDistributable(boolean distributable)
public void start() throws java.lang.Exception
start
in interface LifeCycle
start
in class HttpContext
java.io.IOException
java.lang.Exception
public void stop() throws java.lang.InterruptedException
stop
in interface LifeCycle
stop
in class ServletHttpContext
java.lang.InterruptedException
public void handle(java.lang.String pathInContext, java.lang.String pathParams, HttpRequest httpRequest, HttpResponse httpResponse) throws HttpException, java.io.IOException
HttpContext
handle
in interface HttpHandler
handle
in class HttpContext
pathInContext
- Path in contextpathParams
- Path parameters such as encoded Session IDhttpRequest
- httpResponse
-
HttpException
java.io.IOException
public void addEventListener(java.util.EventListener listener) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void removeEventListener(java.util.EventListener listener)
public void setAttribute(java.lang.String name, java.lang.Object value)
HttpContext
setAttribute
in class HttpContext
name
- attribute namevalue
- attribute valuepublic void removeAttribute(java.lang.String name)
removeAttribute
in class HttpContext
name
- attribute namepublic java.lang.String getDisplayName()
public void setDisplayName(java.lang.String name)
public void setDefaultsDescriptor(java.lang.String defaults)
defaults
- File, Resource, URL or null.public java.lang.String getDefaultsDescriptor()
public void setExtractWAR(boolean extract)
extract
- If true, a WAR is extracted to a temporary
directory before being deployed.public boolean getExtractWAR()
public java.lang.String toString()
toString
in class ServletHttpContext
public void setResourceAlias(java.lang.String alias, java.lang.String uri)
alias
- uri
- public java.lang.String getResourceAlias(java.lang.String alias)
public java.lang.String removeResourceAlias(java.lang.String alias)
public Resource getResource(java.lang.String uriInContext) throws java.io.IOException
ResourceCache
getResource
in class ResourceCache
uriInContext
-
java.io.IOException
public void setErrorPage(java.lang.String error, java.lang.String uriInContext)
error
- A string representing an error code or a
exception classnameuriInContext
- public java.lang.String getErrorPage(java.lang.String error)
error
- A string representing an error code or a
exception classname
public java.lang.String removeErrorPage(java.lang.String error)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |