org.apache.catalina.valves

Class RequestDumperValve

Implemented Interfaces:
Contained, MBeanRegistration, Valve

public class RequestDumperValve
extends ValveBase

Implementation of a Valve that logs interesting contents from the specified Request (before processing) and the corresponding Response (after processing). It is especially useful in debugging problems related to headers and cookies.

This Valve may be attached to any Container, depending on the granularity of the logging you wish to perform.

Version:
$Revision: 1.4 $ $Date: 2004/02/27 14:58:52 $

Author:
Craig R. McClanahan

Field Summary

protected static StringManager
sm
The StringManager for this package.

Fields inherited from class org.apache.catalina.valves.ValveBase

container, controller, debug, domain, info, mserver, oname, sm

Method Summary

String
getInfo()
Return descriptive information about this Valve implementation.
void
invoke(Request request, Response response, ValveContext context)
Log the interesting request parameters, invoke the next Valve in the sequence, and log the interesting response parameters.
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).
String
toString()
Return a String rendering of this object.

Methods inherited from class org.apache.catalina.valves.ValveBase

createObjectName, getContainer, getContainerName, getController, getDebug, getDomain, getInfo, getObjectName, getParentName, invoke, postDeregister, postRegister, preDeregister, preRegister, setContainer, setController, setDebug, setObjectName

Field Details

sm

protected static StringManager sm
The StringManager for this package.

Method Details

getInfo

public String getInfo()
Return descriptive information about this Valve implementation.
Specified by:
getInfo in interface Valve
Overrides:
getInfo in interface ValveBase


invoke

public void invoke(Request request,
                   Response response,
                   ValveContext context)
            throws IOException,
                   ServletException
Log the interesting request parameters, invoke the next Valve in the sequence, and log the interesting response parameters.
Specified by:
invoke in interface Valve
Overrides:
invoke in interface ValveBase

Parameters:
request - The servlet request to be processed
response - The servlet response to be created
context - 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).

Parameters:
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).

Parameters:
message - Message to be logged
throwable - Associated exception


toString

public String toString()
Return a String rendering of this object.


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.