You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Guilherme Silveira <gu...@caelum.com.br> on 2006/07/28 01:27:00 UTC

error-page problem

It seems like a bug in (exact version) tomcat 5.5.17:

As defined per spec 2.4... I have stripped the problem to three files.
The servlet conteiner is not unwrapping the ServletException as
defined in the spec.

Result: error 500.

Expected result: server side redirect to error.jsp

Important test case:

a.jsp:
<%
java.sql.DriverManager.getConnection("aaaa");
%>

web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app id="WebApp_ID" version="2.4"
	xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

	<error-page>
		<exception-type>java.sql.SQLException</exception-type>
		<location>/error.jsp</location>
	</error-page>

</web-app>

error.jsp:
<html>
error
</html>

Should I send it to bugreport/jira tracker? I don't know how to create
a test case for such web app test using tomcat, so I simplified the
test as much as I could.

Att

Guilherme





-- 
Guilherme Silveira
--------------------------------------------------
guilherme.silveira@caelum.com.br
Caelum - Ensino e Solucoes em Java
www.caelum.com.br

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org