Version: 6.0.43
OS: Win7 x64

Currently, the CGIServlet does not appear to support using the 404
error-page specified in the web.xml (ROOT). The error-pages work fine

This appears to be due to the line, res.setStatus(404);, inside of doGet().
According to the documentation for HttpServletResponse.setStatus(int), "If
this method is used to set an error code, then the container's error page
mechanism will not be triggered."

This line appears in all major versions of Tomcat that I have looked into
(8.0.20, 7.0.59).

Just for a quick test, I changed setStatus to sendError and the error-page
worked as expected. Is there a way to have the error-page work without
changing the source code? If not, should I submit a bug report to include a
configuration parameter for the CGIServlet to allow support for the
error-page?

Thanks for any feedback or help you can provide.
- Jake

Reply via email to