public class ServletHttpContext extends HttpContext
__ErrorHandler, __fileClassPathAttr| Constructor and Description |
|---|
ServletHttpContext()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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() |
addClassPath, addClassPaths, addHandler, addHandler, addPermission, addSecurityConstraint, addVirtualHost, addWelcomeFile, canonicalContextPathSpec, clearSecurityConstraints, doStart, flushCache, getAttribute, getAttributeNames, getAttributes, getAuthenticator, getBaseResource, getClassLoader, getClassPath, getContextPath, getEncodingByMimeType, getEncodingMap, getFileClassPath, getHandler, getHandlerIndex, getHandlers, getHosts, getHttpConnection, getHttpContext, getHttpContextName, getHttpServer, getInitParameter, getInitParameterNames, getMaxCachedFileSize, getMaxCacheSize, getMimeByExtension, getMimeMap, getName, getParentClassLoader, getPermissions, getRealm, getRealmName, getRequestLog, getRequests, getRequestsActive, getRequestsActiveMax, getResource, getResourceBase, getResourceMetaData, getResponses1xx, getResponses2xx, getResponses3xx, getResponses4xx, getResponses5xx, getServerClasses, getStatsOn, getStatsOnMs, getStopGracefully, getSystemClasses, getTempDirectory, getVirtualHosts, getWelcomeFile, getWelcomeFiles, handle, handle, initClassLoader, initialize, isClassLoaderJava2Compliant, isRedirectNullPath, leaveContextScope, loadClass, log, removeAttribute, removeHandler, removeHandler, removeVirtualHost, removeWelcomeFile, sendContextError, setAttribute, setAttributes, setAuthenticator, setBaseResource, setClassLoader, setClassLoaderJava2Compliant, setClassPath, setContextPath, setEncodingMap, setHandlers, setHosts, setHttpContextName, setInitParameter, setMaxCachedFileSize, setMaxCacheSize, setMimeMap, setMimeMapping, setParentClassLoader, setPermissions, setRealm, setRealmName, setRedirectNullPath, setRequestLog, setResourceBase, setServerClasses, setStatsOn, setStopGracefully, setSystemClasses, setTempDirectory, setTypeEncoding, setVirtualHosts, setWelcomeFiles, startHandlers, statsReset, stop, toStringaddComponent, addEventListener, getComponents, isFailed, isStarted, isStarting, isStopping, removeComponent, removeEventListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddEventListener, removeEventListenerpublic 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.ClassNotFoundExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionpublic 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.ClassNotFoundExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionprotected boolean jSecurityCheck(java.lang.String pathInContext,
HttpRequest request,
HttpResponse response)
throws java.io.IOException
java.io.IOExceptionpublic boolean checkSecurityConstraints(java.lang.String pathInContext,
HttpRequest request,
HttpResponse response)
throws HttpException,
java.io.IOException
checkSecurityConstraints in class HttpContextHttpExceptionjava.io.IOExceptionpublic void addLocaleEncoding(java.lang.String locale,
java.lang.String encoding)
public java.lang.String getLocaleEncoding(java.util.Locale locale)
locale - a Locale valueString representing the character encoding for
the locale or null if none found.public java.lang.String toString()
toString in class HttpContextpublic void sendError(HttpResponse response, int code, java.lang.String msg) throws java.io.IOException
HttpContextsendError in class HttpContextresponse - the response to sendcode - The error codemsg - The message for the error or null for the defaultjava.io.IOException - Problem sending response.public void destroy()
HttpContextdestroy in class HttpContextpublic java.lang.Object enterContextScope(HttpRequest request, HttpResponse response)
HttpContextenterContextScope in class HttpContextprotected void doStop()
throws java.lang.Exception
HttpContextdoStop in class HttpContextjava.lang.ExceptionCopyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.