public class RequestDumperFilter extends Object implements javax.servlet.Filter
Implementation of a Filter 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.
When using this Filter, it is strongly recommended that the
org.apache.catalina.filter.RequestDumperFilter
logger is
directed to a dedicated file and that the
org.apache.juli.VerbatimFormmater
is used.
Constructor and Description |
---|
RequestDumperFilter() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Log the interesting request parameters, invoke the next Filter in the
sequence, and log the interesting response parameters.
|
void |
init(javax.servlet.FilterConfig filterConfig) |
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
request
- The servlet request to be processedresponse
- The servlet response to be createdchain
- The filter chain being processedIOException
- if an input/output error occursjavax.servlet.ServletException
- if a servlet error occurspublic void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
Copyright © 2018 JBoss by Red Hat. All rights reserved.