tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21843] New: - <error-page> directive not working correctly for jsp compile exceptions
Date Thu, 24 Jul 2003 05:46:14 GMT
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=21843>.
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=21843

<error-page> directive not working correctly for jsp compile exceptions

           Summary: <error-page> directive not working correctly for jsp
                    compile exceptions
           Product: Tomcat 4
           Version: 4.1.24
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: semlj001@hotmail.com


The exception stack trace and request headers are being printed on the error 
page when a jsp compilation error occurs.

----------------------------------------------------
[web.xml]

<web-app>
	...
	<error-page>
		<exception-type>java.lang.Exception</exception-type>
		<location>/error.jsp</location>
	</error-page>
	...
</web-app>
---------------------------
[foo.jsp]

<%@ page language="java" session="true" %>
<html>
<%
this is bad java
%>
</html>
---------------------------------------
[error.jsp]

<%@ page isErrorPage="true" %>
<html>
	<body>
		<h3>This is the default error page</h3>
	</body>
</html>
----------------------------------------
[html source of output]

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac] C:\Tomcat\work\Standalone\localhost\epass\foo_jsp.java:44: not a 
statement
    [javac] this is bad java
    [javac] ^
    [javac] C:\Tomcat\work\Standalone\localhost\epass\foo_jsp.java:44: ';' 
expected
    [javac] this is bad java
    [javac]      ^
    [javac] 2 errors



Set-Cookie: JSESSIONID=8730FECA47432DE0B1E768FF200227BD; Path=/epass
Content-Type: text/html;charset=ISO-8859-1
Transfer-Encoding: chunked
Date: Thu, 24 Jul 2003 05:39:36 GMT
Server: Apache Coyote/1.0

4f

<html>
	<body>
		<h3>This is the default error page</h3>
	</body>
</html>
0
------------------------------------------------

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


Mime
View raw message