public class WebAppConfiguration extends java.lang.Object implements ServletContext, java.util.Comparator
| Constructor and Description |
|---|
WebAppConfiguration(HostConfiguration ownerHostConfig,
Cluster cluster,
java.lang.String webRoot,
java.lang.String prefix,
ObjectPool objectPool,
java.util.Map startupArgs,
org.w3c.dom.Node elm,
java.lang.ClassLoader parentClassLoader,
java.io.File[] parentClassPaths,
java.lang.String contextName)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addJspServletParams(java.util.Map jspParams) |
static boolean |
booleanArg(java.util.Map args,
java.lang.String name,
boolean defaultTrue) |
int |
compare(java.lang.Object one,
java.lang.Object two) |
void |
destroy()
Iterates through each of the servlets/filters and calls destroy on them
|
AccessLogger |
getAccessLogger() |
java.lang.Object |
getAttribute(java.lang.String name)
OK ...
|
java.util.Enumeration |
getAttributeNames() |
ServletContext |
getContext(java.lang.String uri) |
java.lang.String |
getContextName() |
java.lang.String |
getContextPath() |
RequestDispatcher |
getErrorDispatcherByClass(java.lang.Throwable exception)
Gets a dispatcher, set up for error dispatch.
|
RequestDispatcher |
getErrorDispatcherByCode(java.lang.String requestURI,
int statusCode,
java.lang.String summaryMessage,
java.lang.Throwable exception) |
java.lang.Class[] |
getErrorPageExceptions() |
java.util.Map |
getErrorPagesByCode() |
java.util.Map |
getErrorPagesByException() |
java.util.Map |
getFilterMatchCache() |
java.util.Map |
getFilters() |
RequestDispatcher |
getInitialDispatcher(java.lang.String uriInsideWebapp,
WinstoneRequest request,
WinstoneResponse response)
Creates the dispatcher that corresponds to a request level dispatch (ie
the initial entry point).
|
java.lang.String |
getInitParameter(java.lang.String name) |
java.util.Enumeration |
getInitParameterNames() |
java.lang.ClassLoader |
getLoader() |
java.util.Map |
getLocaleEncodingMap() |
int |
getMajorVersion() |
java.lang.String |
getMimeType(java.lang.String fileName)
Look up the map of mimeType extensions, and return the type that matches
|
int |
getMinorVersion() |
RequestDispatcher |
getNamedDispatcher(java.lang.String name)
Named dispatcher - this basically gets us a simple exact dispatcher (no
url matching, no request attributes and no security)
|
java.lang.String |
getOwnerHostname() |
java.lang.String |
getRealPath(java.lang.String path) |
ServletRequestAttributeListener[] |
getRequestAttributeListeners() |
RequestDispatcher |
getRequestDispatcher(java.lang.String uriInsideWebapp)
Gets a dispatcher, which sets the request attributes, etc on a
forward/include.
|
ServletRequestListener[] |
getRequestListeners() |
java.net.URL |
getResource(java.lang.String path) |
java.io.InputStream |
getResourceAsStream(java.lang.String path) |
java.util.Set |
getResourcePaths(java.lang.String path) |
java.lang.String |
getServerInfo() |
Servlet |
getServlet(java.lang.String name)
Deprecated.
|
java.lang.String |
getServletContextName() |
java.util.Enumeration |
getServletNames()
Deprecated.
|
java.util.Enumeration |
getServlets()
Deprecated.
|
java.lang.String |
getServletURIFromRequestURI(java.lang.String requestURI) |
WinstoneSession |
getSessionById(java.lang.String sessionId,
boolean localOnly)
Retrieves the session by id.
|
static java.lang.String |
getTextFromNode(org.w3c.dom.Node node) |
java.lang.String |
getWebroot() |
java.lang.String[] |
getWelcomeFiles() |
static int |
intArg(java.util.Map args,
java.lang.String name,
int defaultValue) |
void |
invalidateExpiredSessions() |
boolean |
isDistributable() |
void |
log(java.lang.Exception exception,
java.lang.String msg)
Deprecated.
|
void |
log(java.lang.String message) |
void |
log(java.lang.String message,
java.lang.Throwable throwable) |
WinstoneSession |
makeNewSession(java.lang.String sessionId)
Constructs a session instance with the given sessionId
|
void |
removeAttribute(java.lang.String name) |
void |
removeServletConfigurationAndMappings(ServletConfiguration config) |
void |
resetClassLoader()
Triggered by the admin thread on the reloading class loader.
|
void |
setAttribute(java.lang.String name,
java.lang.Object object) |
void |
setSessionListeners(WinstoneSession session) |
static java.lang.String |
stringArg(java.util.Map args,
java.lang.String name,
java.lang.String defaultValue) |
public WebAppConfiguration(HostConfiguration ownerHostConfig, Cluster cluster, java.lang.String webRoot, java.lang.String prefix, ObjectPool objectPool, java.util.Map startupArgs, org.w3c.dom.Node elm, java.lang.ClassLoader parentClassLoader, java.io.File[] parentClassPaths, java.lang.String contextName)
public static boolean booleanArg(java.util.Map args,
java.lang.String name,
boolean defaultTrue)
public static java.lang.String stringArg(java.util.Map args,
java.lang.String name,
java.lang.String defaultValue)
public static int intArg(java.util.Map args,
java.lang.String name,
int defaultValue)
public static java.lang.String getTextFromNode(org.w3c.dom.Node node)
public java.lang.String getContextPath()
getContextPath in interface ServletContextpublic java.lang.String getWebroot()
public java.lang.ClassLoader getLoader()
public AccessLogger getAccessLogger()
public java.util.Map getFilters()
public java.lang.String getContextName()
public java.lang.Class[] getErrorPageExceptions()
public java.util.Map getErrorPagesByException()
public java.util.Map getErrorPagesByCode()
public java.util.Map getLocaleEncodingMap()
public java.lang.String[] getWelcomeFiles()
public boolean isDistributable()
public java.util.Map getFilterMatchCache()
public java.lang.String getOwnerHostname()
public ServletRequestListener[] getRequestListeners()
public ServletRequestAttributeListener[] getRequestAttributeListeners()
public static void addJspServletParams(java.util.Map jspParams)
public int compare(java.lang.Object one,
java.lang.Object two)
compare in interface java.util.Comparatorpublic java.lang.String getServletURIFromRequestURI(java.lang.String requestURI)
public void destroy()
public void resetClassLoader()
throws java.io.IOException
java.io.IOExceptionpublic WinstoneSession makeNewSession(java.lang.String sessionId)
sessionId - The sessionID for the new sessionpublic WinstoneSession getSessionById(java.lang.String sessionId, boolean localOnly)
sessionId - The id of the session we wantpublic void invalidateExpiredSessions()
public void setSessionListeners(WinstoneSession session)
public void removeServletConfigurationAndMappings(ServletConfiguration config)
public java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface ServletContextpublic java.util.Enumeration getAttributeNames()
getAttributeNames in interface ServletContextpublic void removeAttribute(java.lang.String name)
removeAttribute in interface ServletContextpublic void setAttribute(java.lang.String name,
java.lang.Object object)
setAttribute in interface ServletContextpublic java.lang.String getInitParameter(java.lang.String name)
getInitParameter in interface ServletContextpublic java.util.Enumeration getInitParameterNames()
getInitParameterNames in interface ServletContextpublic java.lang.String getServerInfo()
getServerInfo in interface ServletContextpublic int getMajorVersion()
getMajorVersion in interface ServletContextpublic int getMinorVersion()
getMinorVersion in interface ServletContextpublic ServletContext getContext(java.lang.String uri)
getContext in interface ServletContextpublic java.lang.String getServletContextName()
getServletContextName in interface ServletContextpublic java.lang.String getMimeType(java.lang.String fileName)
getMimeType in interface ServletContextpublic void log(java.lang.String message)
log in interface ServletContextpublic void log(java.lang.String message,
java.lang.Throwable throwable)
log in interface ServletContextpublic RequestDispatcher getNamedDispatcher(java.lang.String name)
getNamedDispatcher in interface ServletContextpublic RequestDispatcher getRequestDispatcher(java.lang.String uriInsideWebapp)
getRequestDispatcher in interface ServletContextpublic RequestDispatcher getInitialDispatcher(java.lang.String uriInsideWebapp, WinstoneRequest request, WinstoneResponse response) throws java.io.IOException
java.io.IOExceptionpublic RequestDispatcher getErrorDispatcherByClass(java.lang.Throwable exception)
public RequestDispatcher getErrorDispatcherByCode(java.lang.String requestURI, int statusCode, java.lang.String summaryMessage, java.lang.Throwable exception)
public java.net.URL getResource(java.lang.String path)
throws java.net.MalformedURLException
getResource in interface ServletContextjava.net.MalformedURLExceptionpublic java.io.InputStream getResourceAsStream(java.lang.String path)
getResourceAsStream in interface ServletContextpublic java.lang.String getRealPath(java.lang.String path)
getRealPath in interface ServletContextpublic java.util.Set getResourcePaths(java.lang.String path)
getResourcePaths in interface ServletContextpublic Servlet getServlet(java.lang.String name)
getServlet in interface ServletContextpublic java.util.Enumeration getServletNames()
getServletNames in interface ServletContextpublic java.util.Enumeration getServlets()
getServlets in interface ServletContextpublic void log(java.lang.Exception exception,
java.lang.String msg)
log in interface ServletContextCopyright © 2013. All Rights Reserved.