Greetings,

In tomcat 6.x (6.0.14 in my case) I am seeing the following behavior:

If I designate default error pages in my web.xml file:

    <error-page>
        <error-code>404</error-code>
        <location>/docs/error404.html</location>
    </error-page>

Then when I call HttpServletResponse.sendError():

public class DispatchServlet extends HttpServlet {

    public void doGet(HttpServletRequest request,
                      HttpServletResponse response) {
        response.sendError(404);
    }
}

Tomcat returns the designated page, but with an HTTP status of 200.

If I drop the default page then I get the canned response with an HTTP status of 404.

Is that correct?

Seems like it shouldn't work that way to me, but then that's why I'm here, looking for some insight.


Nathan



= = =
Nathan Potter                        ndp at opendap.org
OPeNDAP, Inc.                        541.752.1852



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to