public final class SafeDispatcherServlet
extends javax.servlet.http.HttpServlet
If the underlying Spring DispatcherServlet failed to init(), this
SafeDispatcherServlet will throw an
org.springframework.context.ApplicationContextException on
service().
The exception thrown by the underlying Spring DispatcherServlet init() and caught in the SafeDispatcherServlet init() is exposed as a Servlet Context attribute under the key "exceptionCaughtByServlet".
DispatcherServlet,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static String |
CAUGHT_THROWABLE_KEY
Key under which we will store the exception in the ServletContext.
|
| Constructor and Description |
|---|
SafeDispatcherServlet() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(javax.servlet.ServletConfig config) |
void |
service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicepublic static final String CAUGHT_THROWABLE_KEY
public void init(javax.servlet.ServletConfig config)
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletpublic void service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp)
throws javax.servlet.ServletException,
IOException
service in interface javax.servlet.Servletservice in class javax.servlet.http.HttpServletorg.springframework.context.ApplicationContextException - if the DispatcherServlet does not
initialize properly, but the servlet attempts to process a request.javax.servlet.ServletExceptionIOExceptionCopyright © 2004-2014 Jasig. All Rights Reserved.