Well this should've been simple enough. I modified the project's web.xml in order to display my own error page for 500's:

<error-page>
    <error-code>500</error-code>
    <location>/error.jsp</location>
</error-page>

Then I wrote the simplest servlet in order to test it:

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
    response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}

The custom page (which is located at the root directory) is then completely ignored and I get the default Tomcat error page instead.

I'm using the Tomcat 6 version that comes with the debugger of MyEclipse. I've tripled-checked this for typos, but I can't find anything unusual. I'm wondering whether the error-page tag needs to be in a certain part of the document. Does anyone know what could be going wrong?

*Edit: This is the full web.xml that was requested:

 <?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" 

    xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
    http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<display-name></display-name>

<jsp-config> 
   <jsp-property-group> 
      <url-pattern>/js/base.js</url-pattern>
      <url-pattern>/js/catalog.base.js</url-pattern>
      <url-pattern>/js/minicatalog.base.js</url-pattern>
      <url-pattern>/js/addresses.js</url-pattern>
   </jsp-property-group> 
</jsp-config>

<mime-mapping>
    <extension>pdf</extension>
    <mime-type>application/pdf</mime-type>
</mime-mapping>

<listener>
    <listener-class>org.springframework.web.context.ContextLo
Edit
Report