| java.lang.Object winstone.WebAppConfiguration
WebAppConfiguration | public class WebAppConfiguration implements ServletContext,Comparator(Code) | | Models the web.xml file's details ... basically just a bunch of configuration
details, plus the actual instances of mounted servlets.
author: Rick Knowles version: $Id: WebAppConfiguration.java,v 1.55 2007/11/13 01:42:47 rickknowles Exp $ |
Method Summary | |
public static void | addJspServletParams(Map jspParams) | void | addSession(String sessionId, WinstoneSession session) | public static boolean | booleanArg(Map args, String name, boolean defaultTrue) | public int | compare(Object one, Object two) | public void | destroy() | public AccessLogger | getAccessLogger() | public Object | getAttribute(String name) OK ... | public Enumeration | getAttributeNames() | public javax.servlet.ServletContext | getContext(String uri) | public String | getContextName() | public String | getContextPath() | public RequestDispatcher | getErrorDispatcherByClass(Throwable exception) Gets a dispatcher, set up for error dispatch. | public RequestDispatcher | getErrorDispatcherByCode(int statusCode, String summaryMessage, Throwable exception) | public Class[] | getErrorPageExceptions() | public Map | getErrorPagesByCode() | public Map | getErrorPagesByException() | public Map | getFilterMatchCache() | public Map | getFilters() | public String | getInitParameter(String name) | public Enumeration | getInitParameterNames() | public RequestDispatcher | getInitialDispatcher(String uriInsideWebapp, WinstoneRequest request, WinstoneResponse response) Creates the dispatcher that corresponds to a request level dispatch (ie
the initial entry point). | public ClassLoader | getLoader() | public Map | getLocaleEncodingMap() | public int | getMajorVersion() | public String | getMimeType(String fileName) | public int | getMinorVersion() | public javax.servlet.RequestDispatcher | getNamedDispatcher(String name) | public String | getOwnerHostname() | public String | getRealPath(String path) | public ServletRequestAttributeListener[] | getRequestAttributeListeners() | public javax.servlet.RequestDispatcher | getRequestDispatcher(String uriInsideWebapp) Gets a dispatcher, which sets the request attributes, etc on a
forward/include. | public ServletRequestListener[] | getRequestListeners() | public URL | getResource(String path) | public InputStream | getResourceAsStream(String path) | public Set | getResourcePaths(String path) | public String | getServerInfo() | public javax.servlet.Servlet | getServlet(String name) | public String | getServletContextName() | public Enumeration | getServletNames() | public String | getServletURIFromRequestURI(String requestURI) | public Enumeration | getServlets() | public WinstoneSession | getSessionById(String sessionId, boolean localOnly) Retrieves the session by id. | public static String | getTextFromNode(Node node) | public String | getWebroot() | public String[] | getWelcomeFiles() | public static int | intArg(Map args, String name, int defaultValue) | public void | invalidateExpiredSessions() | public boolean | isDistributable() | public void | log(String message) | public void | log(String message, Throwable throwable) | public void | log(Exception exception, String msg) | public WinstoneSession | makeNewSession(String sessionId) | public void | removeAttribute(String name) | public void | removeServletConfigurationAndMappings(ServletConfiguration config) | void | removeSessionById(String sessionId) | public void | resetClassLoader() Triggered by the admin thread on the reloading class loader. | public void | setAttribute(String name, Object object) | public void | setSessionListeners(WinstoneSession session) | public static String | stringArg(Map args, String name, String defaultValue) | public static boolean | useSavedSessions(Map args) |
JSP_SERVLET_CLASS | final static String JSP_SERVLET_CLASS(Code) | | |
addJspServletParams | public static void addJspServletParams(Map jspParams)(Code) | | |
booleanArg | public static boolean booleanArg(Map args, String name, boolean defaultTrue)(Code) | | |
destroy | public void destroy()(Code) | | Iterates through each of the servlets/filters and calls destroy on them
|
getAttribute | public Object getAttribute(String name)(Code) | | OK ... from here to the end is the interface implementation methods for
the servletContext interface.
|
getErrorPageExceptions | public Class[] getErrorPageExceptions()(Code) | | |
getErrorPagesByCode | public Map getErrorPagesByCode()(Code) | | |
getErrorPagesByException | public Map getErrorPagesByException()(Code) | | |
getFilterMatchCache | public Map getFilterMatchCache()(Code) | | |
getInitialDispatcher | public RequestDispatcher getInitialDispatcher(String uriInsideWebapp, WinstoneRequest request, WinstoneResponse response) throws IOException(Code) | | Creates the dispatcher that corresponds to a request level dispatch (ie
the initial entry point). The difference here is that we need to set up
the dispatcher so that on a forward, it executes the security checks and
the request filters, while not setting any of the request attributes for
a forward. Also, we can't return a null dispatcher in error case - instead
we have to return a dispatcher pre-init'd for showing an error page (eg 404).
A null dispatcher is interpreted to mean a successful 302 has occurred.
|
getLocaleEncodingMap | public Map getLocaleEncodingMap()(Code) | | |
getMajorVersion | public int getMajorVersion()(Code) | | |
getMimeType | public String getMimeType(String fileName)(Code) | | Look up the map of mimeType extensions, and return the type that matches
|
getMinorVersion | public int getMinorVersion()(Code) | | |
getNamedDispatcher | public javax.servlet.RequestDispatcher getNamedDispatcher(String name)(Code) | | Named dispatcher - this basically gets us a simple exact dispatcher (no
url matching, no request attributes and no security)
|
getRequestDispatcher | public javax.servlet.RequestDispatcher getRequestDispatcher(String uriInsideWebapp)(Code) | | Gets a dispatcher, which sets the request attributes, etc on a
forward/include. Doesn't execute security though.
|
getServletContextName | public String getServletContextName()(Code) | | |
getServletURIFromRequestURI | public String getServletURIFromRequestURI(String requestURI)(Code) | | |
getSessionById | public WinstoneSession getSessionById(String sessionId, boolean localOnly)(Code) | | Retrieves the session by id. If the web app is distributable, it asks the
other members of the cluster if it doesn't have it itself.
Parameters: sessionId - The id of the session we want A valid session instance |
intArg | public static int intArg(Map args, String name, int defaultValue)(Code) | | |
invalidateExpiredSessions | public void invalidateExpiredSessions()(Code) | | |
isDistributable | public boolean isDistributable()(Code) | | |
makeNewSession | public WinstoneSession makeNewSession(String sessionId)(Code) | | Constructs a session instance with the given sessionId
Parameters: sessionId - The sessionID for the new session A valid session object |
removeAttribute | public void removeAttribute(String name)(Code) | | |
removeSessionById | void removeSessionById(String sessionId)(Code) | | Add/Remove the session from the collection
|
resetClassLoader | public void resetClassLoader() throws IOException(Code) | | Triggered by the admin thread on the reloading class loader. This will
cause a full shutdown and reinstantiation of the web app - not real
graceful, but you shouldn't have reloading turned on in high load
environments.
|
useSavedSessions | public static boolean useSavedSessions(Map args)(Code) | | |
|
|