Hi all! In Servlet spec, Filters section (SRV.6) I didnt found any mentions that error-handling process should bypass filters. My problem is: I have lot of heavy-working jsps in my app (yes I know bad design etc but at the moment there is no way to rewrite it). Sometimes, when one of jsps generated 200K of output the app-level error is encountered and is thrown to web container. It should return the error-page + status-code of 500 but such a big output in front of it leaded to "early" flush (status code 200 + part of html response was already sent to client). Such big amount of output data should be buffered to prevent "early" commit. I created a bufferer-filter for this purposes. But when I finally got an exception and execution is passed to error page I see that error-page don't use HttpServletResponseWrapper I defined in my filter. Instead of it error-page works with unwrapped object "org.apache.catalina.connector.ResponseFacade" and obviously bypass my filtering logic.
<spec-quote version="2.4" section="9.9.1"> The original unwrapped request and response objects created by the container are passed to the servlet or JSP page. </spec-quote>
(In reply to comment #1) > <spec-quote version="2.4" section="9.9.1"> > The original unwrapped request and response objects created by the container > are passed to the servlet or JSP page. > </spec-quote> I think I found another issue... if the "exception-thrower" jsp contains <%@ page ...errorPage="error.jsp"%> and it generates lots of output, I receive the SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Throwable, location=/error.jsp] java.lang.IllegalStateException at org.apache.coyote.Response.reset(Response.java:296) at org.apache.catalina.connector.Response.reset(Response.java:642) at org.apache.catalina.connector.Response.reset(Response.java:908) it isnt quite good for me but at least it is understandable what I think isnt is the following: if there was a small output prior to exception occurence with conditions above then error.jsp is working with wrapped request/response... if I remove a explicit error.jsp form "page" attributes in jsp then error.jsp is working with unwrapped request/response...
Bugzilla is not a support forum. Please do not reopen bugs for new issues. This bug will be re-marked as invalid with respect to the original bug report. Feel free to open a new bug with the new issue. But at this point - this seems to be a debugging exercise in user code. Please use the tomcat-user list for help.