DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10373>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10373 Wrong response status code for custom error page ------- Additional Comments From [EMAIL PROTECTED] 2002-10-27 03:38 ------- It seems clear to me that the current behavior is broken. Lots of bugs have been closed or dismissed over this "error pages do a RequestDispatcher forward" thing, which seems to be a quirk of the Tomcat implementation, rather than any specific requirement of the specification. At least, if it is stated there, I can't find it; section 9.8 pretty obviously avoids using the word "forward" in its description of what happens. Unless you interpret the last paragraph as applying to all errors, it makes no mention of changing the response code before serving the error page. In any case, a 200 response code is obviously wrong; the only two interpretations that seem tenable are to send the original response code, or to change it to 500. For the sake of usability, I hope you decide on sending the original response code. I fervently hope that implementation-level decisions don't affect what's perceived as the correct behavior in this case. Apparently the correct response code is stored in an attribute called "javax.servlet.error.status_code" as a java.lang.Integer object. As a temporary work-around, would it be possible to set the correct status code again in a scriptlet at the beginning of the error page servlet or JSP? I haven't tried this, but it looks promising. I don't know off-hand whether RequestDispatcher.forward commits the response or not; if not, then this could work. -- To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>