org.apache.catalina.valves
Class ErrorReportValve
java.lang.Object
|
+--org.apache.catalina.valves.ValveBase
|
+--org.apache.catalina.valves.ErrorReportValve
- All Implemented Interfaces:
- Contained, Valve
- public class ErrorReportValve
- extends ValveBase
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:
- $Revision: 466595 $ $Date: 2006-10-21 23:24:41 +0100 (Sat, 21 Oct 2006) $
- Author:
- Remy Maucherat, Craig R. McClanahan, Nicola Ken Barozzi Aisa, Stefano Mazzocchi
Field Summary |
protected static StringManager |
sm
The StringManager for this package. |
Method Summary |
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 |
report(Request request,
Response response,
java.lang.Throwable throwable)
Prints out an error report. |
java.lang.String |
toString()
Return a String rendering of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
sm
protected static StringManager sm
- The StringManager for this package.
ErrorReportValve
public ErrorReportValve()
getInfo
public java.lang.String getInfo()
- Return descriptive information about this Valve implementation.
- Overrides:
getInfo
in class ValveBase
invoke
public void invoke(Request request,
Response response,
ValveContext context)
throws java.io.IOException,
javax.servlet.ServletException
- Invoke the next Valve in the sequence. When the invoke returns, check
the response state, and output an error report is necessary.
- Overrides:
invoke
in class ValveBase
- Parameters:
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- Throws:
java.io.IOException
- if an input/output error occursjavax.servlet.ServletException
- if a servlet error occurs
toString
public java.lang.String toString()
- Return a String rendering of this object.
- Overrides:
toString
in class java.lang.Object
report
protected void report(Request request,
Response response,
java.lang.Throwable throwable)
throws java.io.IOException
- Prints out an error report.
- Parameters:
request
- The request being processedresponse
- The response being generated- Throws:
exception
- The exception that occurred (which possibly wraps
a root cause exception
log
protected void log(java.lang.String message)
- Log a message on the Logger associated with our Container (if any).
- Parameters:
message
- Message to be logged
log
protected void log(java.lang.String message,
java.lang.Throwable throwable)
- Log a message on the Logger associated with our Container (if any).
- Parameters:
message
- Message to be loggedthrowable
- Associated exception
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.