DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=29505>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29505 Tomcat returns HTTP 500 when I use the JSP error pages mechanism Summary: Tomcat returns HTTP 500 when I use the JSP error pages mechanism Product: Tomcat 5 Version: 5.0.25 Platform: PC OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: Servlet & JSP API AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When I use the error page mechanism in JSP, the server returns an HTTP 500 error. This makes IE display an error page instead of my error page. CAUTION: IE behavior is very strange on this error. Indeed, it displays its internal error page if the response has no more than 512 bytes, and it displays my error page otherwise. Here is the network trace returned when I use the error page mechanism. As you can see, the response is my error page (so the expected one), but HTTP code is 500. ========================================================================= HTTP/1.1 500 Internal Server Error Content-Type: text/html Content-Length: 102 Date: Thu, 10 Jun 2004 16:17:20 GMT Server: Apache-Coyote/1.1 Connection: close <html> <body bgcolor="red"> . .<h1> Exception: java.lang.NullPointerException. </body> </html> ============================================================= With Tomcat Version 4.1, the status was 200 As shown by the trace below: ============================================================= HTTP/1.1 200 OK Content-Type: text/html;charset=ISO-8859-1 Content-Length: 102 Date: Thu, 10 Jun 2004 16:15:09 GMT Server: Apache-Coyote/1.1 <html> <body bgcolor="red"> . .<h1> Exception: java.lang.NullPointerException. </body> </html> =================================================== Code to reproduce is: =================================================== --------------- testErr.jsp ------------- <html> <head> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT"> </head> <body bgcolor="lightblue"> <%@ page errorPage="testErrPage.jsp" %> <% String name = null; // Force an exception because name is null. name.equalsIgnoreCase("acura"); %> <H1> Yes fred!!! </H1> </body> </html> --------------- testErrPage.jsp ------------- <html> <body bgcolor="red"> <%@ page isErrorPage="true" %> <h1> Exception: <%= exception.toString() %>. </body> </html> =================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]