org.apache.catalina.valves

Class ErrorReportValve

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: 543307 $ $Date: 2007-06-01 01:08:24 +0200 (Fri, 01 Jun 2007) $

Author: Remy Maucherat Craig R. McClanahan Nicola Ken Barozzi Aisa Stefano Mazzocchi Yoav Shapira

Field Summary
protected static StringManagersm
The StringManager for this package.
Method Summary
StringgetInfo()
Return descriptive information about this Valve implementation.
protected StringgetPartialServletStackTrace(Throwable t)
Print out a partial servlet stack trace (truncating at the last occurrence of javax.servlet.).
voidinvoke(Request request, Response response)
Invoke the next Valve in the sequence.
protected voidreport(Request request, Response response, Throwable throwable)
Prints out an error report.

Field Detail

sm

protected static StringManager sm
The StringManager for this package.

Method Detail

getInfo

public String getInfo()
Return descriptive information about this Valve implementation.

getPartialServletStackTrace

protected String getPartialServletStackTrace(Throwable t)
Print out a partial servlet stack trace (truncating at the last occurrence of javax.servlet.).

invoke

public void invoke(Request request, Response response)
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 response The servlet response to be created

Throws: IOException if an input/output error occurs ServletException if a servlet error occurs

report

protected void report(Request request, Response response, Throwable throwable)
Prints out an error report.

Parameters: request The request being processed response The response being generated throwable The exception that occurred (which possibly wraps a root cause exception

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.