|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--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 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 | |
WebApplicationContext()
Constructor. |
|
WebApplicationContext(java.lang.String webApp)
Constructor. |
|
| Method Summary | |
void |
addEventListener(java.util.EventListener listener)
|
java.lang.String |
getDefaultsDescriptor()
|
java.lang.String |
getDeploymentDescriptor()
|
java.lang.String |
getDisplayName()
|
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.util.Map |
getTagLibMap()
Get the taglib map. |
java.lang.String |
getWAR()
|
WebApplicationHandler |
getWebApplicationHandler()
|
boolean |
handle(java.lang.String pathInContext,
java.lang.String pathParams,
HttpRequest httpRequest,
HttpResponse httpResponse)
Handler request. |
boolean |
isIgnoreWebJetty()
|
void |
readExternal(java.io.ObjectInput in)
|
void |
removeAttribute(java.lang.String name)
|
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 |
setBaseResource(Resource baseResource)
Set the base resource. |
void |
setClassPath(java.lang.String classPath)
Sets the class path for the context. |
void |
setDefaultsDescriptor(java.lang.String defaults)
Set the defaults web.xml file. |
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 |
setResourceBase(java.lang.String resourceBase)
Set the Resource Base. |
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 |
addServlet, addServlet, checkSecurityConstraints, getServletContext, setDynamicServletPathSpec |
| 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.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundExceptionpublic 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 ServletHandler getServletHandler()
getServletHandler in class ServletHttpContextpublic void setPermissions(java.security.PermissionCollection permissions)
HttpContext
setPermissions in class HttpContextpermissions - public boolean isIgnoreWebJetty()
public void setIgnoreWebJetty(boolean b)
b - If TRUE, web-jetty.xml and jetty-web.xml configuration
files are ignored.
public void start()
throws java.lang.Exception
start in interface LifeCyclestart in class HttpContextjava.io.IOException
java.lang.Exception - An arbitrary exception may be thrown.
public void stop()
throws java.lang.InterruptedException
stop in interface LifeCyclestop in class ServletHttpContextjava.lang.InterruptedException
public boolean handle(java.lang.String pathInContext,
java.lang.String pathParams,
HttpRequest httpRequest,
HttpResponse httpResponse)
throws HttpException,
java.io.IOException
HttpContext
handle in class HttpContextpathInContext - 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.IllegalArgumentExceptionpublic void removeEventListener(java.util.EventListener listener)
public void setAttribute(java.lang.String name,
java.lang.Object value)
HttpContext
setAttribute in class HttpContextname - attribute namevalue - attribute valuepublic void removeAttribute(java.lang.String name)
removeAttribute in class HttpContextname - attribute namepublic java.lang.String getDisplayName()
public java.lang.String getDeploymentDescriptor()
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 ServletHttpContextpublic void setClassPath(java.lang.String classPath)
HttpContext
setClassPath in class HttpContextclassPath - a comma or ';' separated list of class
resources. These may be jar files, directories or URLs to jars
or directories.public void setResourceBase(java.lang.String resourceBase)
HttpContext
setResourceBase in class HttpContextresourceBase - A URL prefix or directory name.public void setBaseResource(Resource baseResource)
HttpContext
setBaseResource in class HttpContextbaseResource - The resourceBase as a Resource instancepublic java.util.Map getTagLibMap()
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
HttpContext
getResource in class HttpContexturiInContext -
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||