|
||||||||||
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
ServletHttpContext. Extends HttpContext with conveniance methods for adding servlets. Enforces a single ServletHandler per context.
Nested Class Summary |
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 | |
ServletHttpContext()
Constructor. |
Method Summary | |
void |
addLocaleEncoding(java.lang.String locale,
java.lang.String encoding)
|
ServletHolder |
addServlet(java.lang.String pathSpec,
java.lang.String className)
Add a servlet to the context. |
ServletHolder |
addServlet(java.lang.String name,
java.lang.String pathSpec,
java.lang.String className)
Add a servlet to the context. |
boolean |
checkSecurityConstraints(java.lang.String pathInContext,
HttpRequest request,
HttpResponse response)
|
java.lang.String |
getLocaleEncoding(java.util.Locale locale)
Get the character encoding for a locale. |
ServletContext |
getServletContext()
|
ServletHandler |
getServletHandler()
Get the context ServletHandler. |
void |
sendError(HttpResponse response,
int code,
java.lang.String msg)
Send an error response. |
void |
stop()
Stop the context. |
java.lang.String |
toString()
|
Methods inherited from class org.mortbay.http.ResourceCache |
getBaseResource, getEncodingByMimeType, getEncodingMap, getMaxCachedFileSize, getMaxCacheSize, getMimeByExtension, getMimeMap, getResource, 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 ServletHttpContext()
Method Detail |
public ServletContext getServletContext()
public ServletHandler getServletHandler()
public ServletHolder addServlet(java.lang.String pathSpec, java.lang.String className) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
pathSpec
- The pathspec within the contextclassName
- The classname of the servlet.
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public ServletHolder addServlet(java.lang.String name, java.lang.String pathSpec, java.lang.String className) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
name
- The name of the servlet.pathSpec
- The pathspec within the contextclassName
- The classname of the servlet.
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public boolean checkSecurityConstraints(java.lang.String pathInContext, HttpRequest request, HttpResponse response) throws HttpException, java.io.IOException
checkSecurityConstraints
in class HttpContext
HttpException
java.io.IOException
public void addLocaleEncoding(java.lang.String locale, java.lang.String encoding)
public java.lang.String getLocaleEncoding(java.util.Locale locale)
locale
- a Locale
value
String
representing the character encoding for
the locale or null if none found.public void stop() throws java.lang.InterruptedException
HttpContext
stop
in interface LifeCycle
stop
in class HttpContext
java.lang.InterruptedException
public java.lang.String toString()
toString
in class HttpContext
public void sendError(HttpResponse response, int code, java.lang.String msg) throws java.io.IOException
HttpContext
sendError
in class HttpContext
response
- the response to sendcode
- The error codemsg
- The message for the error or null for the default
java.io.IOException
- Problem sending response.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |