You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Julien Oix <ju...@presidence.univ-nantes.fr> on 2004/07/06 17:53:39 UTC

How to catch and redirect an error code 500 with Tomcat apache ?

Hi everyone

I can't manage to redirect a 500 error code page to a customized error page,
even I can't see any trouble in my conf's files.

# config
Linux RedHat 7.1
Apache 1.3.27 (rpm)
Tomcat 4.1.18 (rpm)
mod_jk 1.2.2 (rpm)

#apache myVH.conf
ErrorDocument 500 /jsp/500.jsp

#tomcat myapps/WEB-INF/web.xml
<error-page>
        <error-code>500</error-code>
        <location>/jsp/500.jsp</location>
</error-page>

apache gets a 500 error code
# myapps_access_log
193.52.112.54 - - [05/Jul/2004:15:52:49 +0200] "GET /Login.do HTTP/1.1" 500
3990

but the browser prints the default tomcat error page and not my customized
500.jsp ...

PS : there's no compilation problem in my 500.jsp, it could have been the
reason why tomcat can't print it and redirects to it's own 500 error page

Thanks in advance :)

Julien OIX
Service Informatique de Gestion - Université de Nantes
Tel: 02 40 99 83 65 / abroad + (33) 240 99 83 65
Fax: 02 40 99 83 84 / abroad + (33) 240 99 83 84
Web: http://www.univ-nantes.fr
mailto:julien.oix@presidence.univ-nantes.fr


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


Re: How to catch and redirect an error code 500 with Tomcat apache ?

Posted by Tim Kelly <tk...@buildingengines.com>.
We had to put the error-page definition in this file:
jakarta-tomcat-4.1.27-LE-jdk14/webapps/ROOT/WEB-INF/web.xml

Restart tomcat and it should be picked up.

Tim

Julien Oix wrote:

>Hi everyone
>
>I can't manage to redirect a 500 error code page to a customized error page,
>even I can't see any trouble in my conf's files.
>
># config
>Linux RedHat 7.1
>Apache 1.3.27 (rpm)
>Tomcat 4.1.18 (rpm)
>mod_jk 1.2.2 (rpm)
>
>#apache myVH.conf
>ErrorDocument 500 /jsp/500.jsp
>
>#tomcat myapps/WEB-INF/web.xml
><error-page>
>        <error-code>500</error-code>
>        <location>/jsp/500.jsp</location>
></error-page>
>
>apache gets a 500 error code
># myapps_access_log
>193.52.112.54 - - [05/Jul/2004:15:52:49 +0200] "GET /Login.do HTTP/1.1" 500
>3990
>
>but the browser prints the default tomcat error page and not my customized
>500.jsp ...
>
>PS : there's no compilation problem in my 500.jsp, it could have been the
>reason why tomcat can't print it and redirects to it's own 500 error page
>
>Thanks in advance :)
>
>Julien OIX
>Service Informatique de Gestion - Université de Nantes
>Tel: 02 40 99 83 65 / abroad + (33) 240 99 83 65
>Fax: 02 40 99 83 84 / abroad + (33) 240 99 83 84
>Web: http://www.univ-nantes.fr
>mailto:julien.oix@presidence.univ-nantes.fr
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>  
>

-- 
Tim Kelly, Director of Development
Building Engines, Inc.

Phone: 781-290-5300
Cell: 508-561-0985

www.buildingengines.com

275 Wyman Street
Suite 11
Waltham MA 02451






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