|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openqa.jetty.util.Container
org.openqa.jetty.http.HttpContext
org.openqa.jetty.jetty.servlet.ServletHttpContext
public class ServletHttpContext
ServletHttpContext. Extends HttpContext with conveniance methods for adding servlets. Enforces a single ServletHandler per context.
| Field Summary |
|---|
| Fields inherited from class org.openqa.jetty.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)
|
void |
destroy()
Destroy a context. |
protected void |
doStop()
Stop the context. |
java.lang.Object |
enterContextScope(HttpRequest request,
HttpResponse response)
Enter the context scope. |
java.lang.String |
getLocaleEncoding(java.util.Locale locale)
Get the character encoding for a locale. |
javax.servlet.ServletContext |
getServletContext()
|
ServletHandler |
getServletHandler()
Get the context ServletHandler. |
protected boolean |
jSecurityCheck(java.lang.String pathInContext,
HttpRequest request,
HttpResponse response)
|
void |
sendError(HttpResponse response,
int code,
java.lang.String msg)
Send an error response. |
java.lang.String |
toString()
|
| Methods inherited from class org.openqa.jetty.util.Container |
|---|
addComponent, addEventListener, getComponents, isStarted, isStarting, isStopping, removeComponent, removeEventListener, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openqa.jetty.util.LifeCycle |
|---|
isStarted, start, stop |
| Methods inherited from interface org.openqa.jetty.util.EventProvider |
|---|
addEventListener, removeEventListener |
| Constructor Detail |
|---|
public ServletHttpContext()
| Method Detail |
|---|
public javax.servlet.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
protected boolean jSecurityCheck(java.lang.String pathInContext,
HttpRequest request,
HttpResponse response)
throws java.io.IOException
java.io.IOException
public boolean checkSecurityConstraints(java.lang.String pathInContext,
HttpRequest request,
HttpResponse response)
throws HttpException,
java.io.IOException
checkSecurityConstraints in class HttpContextHttpException
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 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 HttpContextresponse - the response to sendcode - The error codemsg - The message for the error or null for the default
java.io.IOException - Problem sending response.public void destroy()
HttpContext
destroy in class HttpContext
public java.lang.Object enterContextScope(HttpRequest request,
HttpResponse response)
HttpContext
enterContextScope in class HttpContext
protected void doStop()
throws java.lang.Exception
HttpContext
doStop in class HttpContextjava.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||