You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/02/23 21:49:57 UTC

DO NOT REPLY [Bug 33715] New: - isErrorPage="true" causes HTTP 500 error

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=33715>.
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=33715

           Summary: isErrorPage="true" causes HTTP 500 error
           Product: Tomcat 5
           Version: 5.0.28
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: bgaydek@umich.edu


When JSP page uses the isErrorPage="true" directive the following code is added 
to the servlet:

    Throwable exception = 
org.apache.jasper.runtime.JspRuntimeLibrary.getThrowable(request);
    if (exception != null) {
      response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    }

This cause the response to have a status code of 500, Internal Server Error.  
When Internet Explorer (tested on 5.5 on Windows 2000 SP4) receives a 500 
stauts it displays it's own error page and does not display the correct JSP 
error page.  This causes the JSP isErrorPage="true" directive to be useless 
since the actual page cannot be viewed in Internet Explorer.

To workaround, I created an error page that does not use the isErrorPage="true" 
directive rather declares the exception and gets it from the session inside the 
page body.  The JSP specification does not specify that a 500 status should be 
returned in the event of request-time errors using JSP error pages.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org