Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.catalina.valves
Class ErrorReportValve  view ErrorReportValve download ErrorReportValve.java

java.lang.Object
  extended byorg.apache.catalina.valves.ValveBase
      extended byorg.apache.catalina.valves.ErrorReportValve
All Implemented Interfaces:
org.apache.catalina.Contained, javax.management.MBeanRegistration, org.apache.catalina.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: 304023 $ $Date: 2005-07-26 08:45:22 -0400 (Tue, 26 Jul 2005) $

Field Summary
private static java.lang.String info
          The descriptive information related to this implementation.
protected static org.apache.catalina.util.StringManager sm
          The StringManager for this package.
 
Fields inherited from class org.apache.catalina.valves.ValveBase
container, containerLog, controller, domain, mserver, next, oname
 
Constructor Summary
ErrorReportValve()
           
 
Method Summary
 java.lang.String getInfo()
          Return descriptive information about this Valve implementation.
 void invoke(org.apache.catalina.connector.Request request, org.apache.catalina.connector.Response response)
          Invoke the next Valve in the sequence.
protected  void report(org.apache.catalina.connector.Request request, org.apache.catalina.connector.Response response, java.lang.Throwable throwable)
          Prints out an error report.
 
Methods inherited from class org.apache.catalina.valves.ValveBase
backgroundProcess, createObjectName, getContainer, getContainerName, getController, getDomain, getNext, getObjectName, getParentName, postDeregister, postRegister, preDeregister, preRegister, setContainer, setController, setNext, setObjectName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

info

private static final java.lang.String info
The descriptive information related to this implementation.

See Also:
Constant Field Values

sm

protected static org.apache.catalina.util.StringManager sm
The StringManager for this package.

Constructor Detail

ErrorReportValve

public ErrorReportValve()
Method Detail

getInfo

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

Specified by:
getInfo in interface org.apache.catalina.Valve
Overrides:
getInfo in class ValveBase

invoke

public void invoke(org.apache.catalina.connector.Request request,
                   org.apache.catalina.connector.Response response)
            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.

Specified by:
invoke in interface org.apache.catalina.Valve
Specified by:
invoke in class ValveBase

report

protected void report(org.apache.catalina.connector.Request request,
                      org.apache.catalina.connector.Response response,
                      java.lang.Throwable throwable)
               throws java.io.IOException
Prints out an error report.