I have a question regarding filtering of responses using wrappers.
I have noted in JSP books that whenever the class HttpServletResponseWrapper is extended by a programmer's own wrapper class, the programmer has to provide definition for both the getWriter() method as well as getOutputStream() method.
Is it required to provide definition for both methods? If so, can somebody tell met the reason as in my case I have provided definition for only the getWriter() method and my filter works fine.
I've only needed to do this a few times and I didn't override both either. I'm guessing the reason is that a servlet could call getOutputStream() and would miss the new logic. Which does imply it is a good idea. But I haven't been burned not doing it either.