| java.lang.Object org.apache.catalina.valves.ValveBase org.apache.catalina.valves.ErrorDispatcherValve
ErrorDispatcherValve | public class ErrorDispatcherValve extends ValveBase (Code) | | Implementation of a Valve that handles the error dispatch (that is, will
forward to the appropriate error page if necessary).
This Valve should be attached at the Host level, although it will work
if attached to a Context.
WARNING: This valve is necessary for Servlet API compliance.
author: Remy Maucherat author: Craig R. McClanahan version: $Revision: 1.8 $ $Date: 2001/12/02 22:19:26 $ |
Field Summary | |
protected int | debug The debugging detail level for this component. | final protected static String | info The descriptive information related to this implementation. | protected static StringManager | sm The StringManager for this package. |
Method Summary | |
protected boolean | custom(Request request, Response response, ErrorPage errorPage) Handle an HTTP status code or Java exception by forwarding control
to the location included in the specified errorPage object. | protected static ErrorPage | findErrorPage(Context context, Throwable exception) Find and return the ErrorPage instance for the specified exception's
class, or an ErrorPage instance for the closest superclass for which
there is such a definition. | public String | getInfo() Return descriptive information about this Valve implementation. | public void | invoke(Request request, Response response, ValveContext context) Invoke the next Valve in the sequence. | protected void | log(String message) Log a message on the Logger associated with our Container (if any). | protected void | log(String message, Throwable throwable) Log a message on the Logger associated with our Container (if any). | protected void | status(Request request, Response response) Handle the HTTP status code (and corresponding message) generated
while processing the specified Request to produce the specified
Response. | protected void | throwable(Request request, Response response, Throwable throwable) Handle the specified Throwable encountered while processing
the specified Request to produce the specified Response. | public String | toString() Return a String rendering of this object. |
debug | protected int debug(Code) | | The debugging detail level for this component.
|
info | final protected static String info(Code) | | The descriptive information related to this implementation.
|
custom | protected boolean custom(Request request, Response response, ErrorPage errorPage)(Code) | | Handle an HTTP status code or Java exception by forwarding control
to the location included in the specified errorPage object. It is
assumed that the caller has already recorded any request attributes
that are to be forwarded to this page. Return true if
we successfully utilized the specified error page location, or
false if the default error report should be rendered.
Parameters: request - The request being processed Parameters: response - The response being generated Parameters: errorPage - The errorPage directive we are obeying |
findErrorPage | protected static ErrorPage findErrorPage(Context context, Throwable exception)(Code) | | Find and return the ErrorPage instance for the specified exception's
class, or an ErrorPage instance for the closest superclass for which
there is such a definition. If no associated ErrorPage instance is
found, return null .
Parameters: context - The Context in which to search Parameters: exception - The exception for which to find an ErrorPage |
getInfo | public String getInfo()(Code) | | Return descriptive information about this Valve implementation.
|
invoke | public void invoke(Request request, Response response, ValveContext context) throws IOException, ServletException(Code) | | Invoke the next Valve in the sequence. When the invoke returns, check
the response state, and output an error report is necessary.
Parameters: request - The servlet request to be processed Parameters: response - The servlet response to be created Parameters: context - The valve context used to invoke the next valvein the current processing pipeline exception: IOException - if an input/output error occurs exception: ServletException - if a servlet error occurs |
log | protected void log(String message)(Code) | | Log a message on the Logger associated with our Container (if any).
Parameters: message - Message to be logged |
log | protected void log(String message, Throwable throwable)(Code) | | Log a message on the Logger associated with our Container (if any).
Parameters: message - Message to be logged Parameters: throwable - Associated exception |
status | protected void status(Request request, Response response)(Code) | | Handle the HTTP status code (and corresponding message) generated
while processing the specified Request to produce the specified
Response. Any exceptions that occur during generation of the error
report are logged and swallowed.
Parameters: request - The request being processed Parameters: response - The response being generated |
throwable | protected void throwable(Request request, Response response, Throwable throwable)(Code) | | Handle the specified Throwable encountered while processing
the specified Request to produce the specified Response. Any
exceptions that occur during generation of the exception report are
logged and swallowed.
Parameters: request - The request being processed Parameters: response - The response being generated Parameters: exception - The exception that occurred (which possibly wrapsa root cause exception |
toString | public String toString()(Code) | | Return a String rendering of this object.
|
|
|