org.apache.catalina.valves
Class ErrorReportValve
- Contained, MBeanRegistration, Valve
public class ErrorReportValve
Implementation of a Valve that outputs HTML error pages.
This Valve should be attached at the Host level, although it will work
if attached to a Context.
HTML code from the Cocoon 2 project.
Version:
- Remy Maucherat
- Craig R. McClanahan
- Nicola Ken Barozzi Aisa
- Stefano Mazzocchi
- Yoav Shapira
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(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 | report(Request request, Response response, Throwable throwable) - Prints out an error report.
|
String | toString() - Return a String rendering of this object.
|
createObjectName , getContainer , getContainerName , getController , getDebug , getDomain , getInfo , getObjectName , getParentName , invoke , postDeregister , postRegister , preDeregister , preRegister , setContainer , setController , setDebug , setObjectName |
sm
protected static StringManager sm
The StringManager for this package.
getInfo
public String getInfo()
Return descriptive information about this Valve implementation.
- getInfo in interface Valve
- getInfo in interface ValveBase
invoke
public void invoke(Request request,
Response response,
ValveContext context)
throws IOException,
ServletException
Invoke the next Valve in the sequence. When the invoke returns, check
the response state, and output an error report is necessary.
- invoke in interface Valve
- invoke in interface ValveBase
request
- 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
log
protected void log(String message)
Log a message on the Logger associated with our Container (if any).
message
- Message to be logged
log
protected void log(String message,
Throwable throwable)
Log a message on the Logger associated with our Container (if any).
message
- Message to be loggedthrowable
- Associated exception
report
protected void report(Request request,
Response response,
Throwable throwable)
throws IOException
Prints out an error report.
request
- The request being processedresponse
- The response being generatedthrowable
- The exception that occurred (which possibly wraps
a root cause exception
toString
public String toString()
Return a String rendering of this object.
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.