filters
Class RequestDumperFilter

java.lang.Object
  extended by filters.RequestDumperFilter
All Implemented Interfaces:
Filter

public final class RequestDumperFilter
extends Object
implements Filter

Example filter that dumps interesting state information about a request to the associated servlet context log file, before allowing the servlet to process the request in the usual way. This can be installed as needed to assist in debugging problems.

Author:
Craig McClanahan

Constructor Summary
RequestDumperFilter()
           
 
Method Summary
 void destroy()
          Take this filter out of service.
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
          Time the processing that is performed by all subsequent filters in the current filter stack, including the ultimately invoked servlet.
 void init(FilterConfig filterConfig)
          Place this filter into service.
 String toString()
          Return a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestDumperFilter

public RequestDumperFilter()
Method Detail

destroy

public void destroy()
Take this filter out of service.

Specified by:
destroy in interface Filter

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws IOException,
                     ServletException
Time the processing that is performed by all subsequent filters in the current filter stack, including the ultimately invoked servlet.

Specified by:
doFilter in interface Filter
Parameters:
request - The servlet request we are processing
result - The servlet response we are creating
chain - The filter chain we are processing
Throws:
IOException - if an input/output error occurs
ServletException - if a servlet error occurs

init

public void init(FilterConfig filterConfig)
          throws ServletException
Place this filter into service.

Specified by:
init in interface Filter
Parameters:
filterConfig - The filter configuration object
Throws:
ServletException

toString

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

Overrides:
toString in class Object


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.