tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Jamison <>
Subject Re: Future of Filter?
Date Wed, 25 Apr 2001 14:13:53 GMT
Amy Roh wrote:

> Servlet spec 2.3 has changed to support init(FilterConfig config) and
> destroy() methods instead of getFilterConfig() and
> setFilterConfig(FilterConfig config) after discussion to change filter cycle
> to be similar to the servlet life cycle in the expert group.  The recent
> changes will be reflected in the new Proposed Final Draft 2 (which will be
> available to public very soon).  So TC4 is up to date with the recent spec.
> :-)
> Amy
Thanks, that's what I suspected.

By the way, I did not find any examples that actually performed any
filtering.  Would this be a common usage pattern for Filter?  :

==== SNIP ====

public class MyFilter implements Filter

//---An inner class wrapper that does my filtering
class MyServletResponse extends ServletResponseWrapper
  public MyServletResponse(ServletResponse response)
   //do stuff
//---end inner class

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
                  throws IOException,ServletException
  MyServletResponse altResponse = new MyServletResponse(response);


==== UN-SNIP ====

Something like that, maybe?

Anyway, thanks again.


View raw message