Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why <error-page> in web.xml does not work ?

843836Oct 15 2004 — edited Oct 20 2004
Hello,

I am trying to catch errors (error 404, 500...), but it does not work and I do not know why....
I have tried to configure the web.xml file as follows :

web.xml :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
.....

<error-page>
<exception-type>404</exception-type>
<location>/error/404error.html</location>
</error-page>
<error-page>
<exception-type>500</exception-type>
<location>/error/500error.html</location>
</error-page>

.......

</web-app>

Do you have any idea ?

Thanks :o)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2004
Added on Oct 15 2004
8 comments
324 views