I'm running Tomcat 4.1.18
I've just about about finished a Filter that wraps the response and allows caching to take place by storing the response in a ByteArrayOutputStream. Currently, I have my Filter deployed in the Examples Application bound to /jsp/*. It will cache HTML files just fine, but any time I request a JSP, I can see that getWriter() is being called for which I return my OutputStream wrapped in a PrintWriter. After passing through the chain with the filter, I output how many bytes were written to Log4j, with HTML files, it displays correctly, but whenever I request a JSP, nothing is written and a 0 length byte array is returned from my outputStream. Is there a method other than getOutputStream() and getWriter() that Tomcat is using to write the content of JSP's out because thus far, these are the only method's I've proxied for caching-but again, with JSP pages, nothing is written to the writer or output stream? PLEASE HELP!! -Jacob
