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.
WARNING: Using this valve has side-effects. The output from this valve includes any parameters associated with the request. Therefore, the InputStream is consumed for requests made with the method POST and content-type application/x-www-form-urlencoded.
This Valve may be attached to any Container, depending on the granularity of the logging you wish to perform.
Modifier and Type | Field and Description |
---|---|
protected static StringManager |
sm
The StringManager for this package.
|
container, containerLog, controller, domain, mserver, next, oname
Constructor and Description |
---|
RequestDumperValve() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getInfo()
Return descriptive information about this Valve implementation.
|
void |
invoke(Request request,
Response response)
Log the interesting request parameters, invoke the next Valve in the
sequence, and log the interesting response parameters.
|
java.lang.String |
toString()
Return a String rendering of this object.
|
backgroundProcess, createObjectName, event, getContainer, getContainerName, getController, getDomain, getNext, getObjectName, getParentName, postDeregister, postRegister, preDeregister, preRegister, setContainer, setController, setNext, setObjectName
protected static StringManager sm
public java.lang.String getInfo()
public void invoke(Request request, Response response) throws java.io.IOException, javax.servlet.ServletException
invoke
in interface Valve
invoke
in class ValveBase
request
- The servlet request to be processedresponse
- The servlet response to be createdjava.io.IOException
- if an input/output error occursjavax.servlet.ServletException
- if a servlet error occursCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.