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)
{
super(response);
//do stuff
}
}
//---end inner class
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws IOException,ServletException
{
MyServletResponse altResponse = new MyServletResponse(response);
chain.doFilter(request,altResponse);
}
}
==== UN-SNIP ====
Something like that, maybe?
Anyway, thanks again.
Bob