Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 43019 invoked from network); 10 Jun 2004 16:19:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Jun 2004 16:19:26 -0000 Received: (qmail 61169 invoked by uid 500); 10 Jun 2004 16:19:22 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 61086 invoked by uid 500); 10 Jun 2004 16:19:21 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 61068 invoked by uid 99); 10 Jun 2004 16:19:21 -0000 Received: from [192.18.33.10] (HELO exchange.sun.com) (192.18.33.10) by apache.org (qpsmtpd/0.27.1) with SMTP; Thu, 10 Jun 2004 09:19:21 -0700 Received: (qmail 3225 invoked by uid 50); 10 Jun 2004 16:20:13 -0000 Date: 10 Jun 2004 16:20:13 -0000 Message-ID: <20040610162013.3224.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 29505] New: - Tomcat returns HTTP 500 when I use the JSP error pages mechanism X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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: tomcat-dev@jakarta.apache.org ReportedBy: fchristol@fvc.com 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 . .

Exception: java.lang.NullPointerException. ============================================================= 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 . .

Exception: java.lang.NullPointerException. =================================================== Code to reproduce is: =================================================== --------------- testErr.jsp ------------- <%@ page errorPage="testErrPage.jsp" %> <% String name = null; // Force an exception because name is null. name.equalsIgnoreCase("acura"); %>

Yes fred!!!

--------------- testErrPage.jsp ------------- <%@ page isErrorPage="true" %>

Exception: <%= exception.toString() %>. =================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org