RE: Filter tricks in tomcat

2004-11-09 Thread Shapira, Yoav
Hi, I assume that when you say capture you mean handle ? Or maybe wrap? To only handle outgoing (response) data in a filter, do something like this: public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws Blah { chain.doFilter(request, response);

Re: Filter tricks in tomcat

2004-11-09 Thread Peter Lin
actually, you can use filters to capture the response and then use a filter to dump the whole thing to the outputstream. What you'll have to do is create your own buffer to hold the content and not write to either the jspwriter or the printwriter in the servlet. the tricky part is this. if you