|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.catalina.valves.ValveBase
org.apache.catalina.valves.ErrorDispatcherValve
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.
| Field Summary | |
protected int |
debug
The debugging detail level for this component. |
protected static java.lang.String |
info
The descriptive information related to this implementation. |
protected static StringManager |
sm
The StringManager for this package. |
| Fields inherited from class org.apache.catalina.valves.ValveBase |
container |
| Constructor Summary | |
ErrorDispatcherValve()
|
|
| 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,
java.lang.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. |
java.lang.String |
getInfo()
Return descriptive information about this Valve implementation. |
void |
invoke(Request request,
Response response,
ValveContext context)
Invoke the next Valve in the sequence. |
protected void |
log(java.lang.String message)
Log a message on the Logger associated with our Container (if any). |
protected void |
log(java.lang.String message,
java.lang.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,
java.lang.Throwable throwable)
Handle the specified Throwable encountered while processing the specified Request to produce the specified Response. |
java.lang.String |
toString()
Return a String rendering of this object. |
| Methods inherited from class org.apache.catalina.valves.ValveBase |
getContainer, getDebug, setContainer, setDebug |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int debug
protected static final java.lang.String info
protected static StringManager sm
| Constructor Detail |
public ErrorDispatcherValve()
| Method Detail |
public java.lang.String getInfo()
getInfo in interface ValvegetInfo in class ValveBase
public void invoke(Request request,
Response response,
ValveContext context)
throws java.io.IOException,
javax.servlet.ServletException
invoke in interface Valveinvoke in class ValveBaserequest - The servlet request to be processedresponse - The servlet response to be createdcontext - The valve context used to invoke the next valve
in the current processing pipeline
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet error occurspublic java.lang.String toString()
protected void throwable(Request request,
Response response,
java.lang.Throwable throwable)
request - The request being processedresponse - The response being generated
protected void status(Request request,
Response response)
request - The request being processedresponse - The response being generated
protected static ErrorPage findErrorPage(Context context,
java.lang.Throwable exception)
null.
context - The Context in which to searchexception - The exception for which to find an ErrorPage
protected boolean custom(Request request,
Response response,
ErrorPage errorPage)
true if
we successfully utilized the specified error page location, or
false if the default error report should be rendered.
request - The request being processedresponse - The response being generatederrorPage - The errorPage directive we are obeyingprotected void log(java.lang.String message)
message - Message to be logged
protected void log(java.lang.String message,
java.lang.Throwable throwable)
message - Message to be loggedthrowable - Associated exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||