Summary: | Custom HTTP 400 error page | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | PG <pari.gandhi> |
Component: | Unknown | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | quartz12h, yoavs |
Priority: | P3 | ||
Version: | 5.0.30 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | other |
Description
PG
2004-10-20 07:27:14 UTC
Not only is it not a known bug, but custom 404 error mapping works for me (on 5.0.28). Please discuss on the mailing list if you want help for your specific setup. using 5.0.27, it still has the bug. The Coyote http11 adapter catches the bad uri syntax and doesn't redirect to the error page. Example url: http://host/hoho% <error-page> <error-code>400</error-code> <location>/WEB-INF/pages/servletErrors.jsp</location> </error-page> Please try 5.0.28 (latest stable on 5.0.x branch), 5.5.9 (latest stable overall), or 5.0.30 beta (latest 5.0.x). Not fixed in 5.0.30 either (assuming implicitely 5.0.28) 5.5.x doesn't matter, this bug must be fixed on 5.0.x stream anyway. 5.5.x requires updates and jdk15 which is not expected for a bug fix release. 5.5.x *does not* requires Java 5. It is very unlikely at this point there will be another 5.0.x release. Note: In case of a bad URI, or any invalid request (ex: no host), the connector itself will return the 400. This will NOT be handled by the servlet layer, since the request will never get mapped. Please do not reopen the report. (Sorry Yoavs for CC'ing, I have to contradict the verdict and hope someone else than our hurried friend will handle this...) The 400 status code can have and should forward to a page handler if any. It sure has no mapping, but doesn't need so. The url is in the web.xml plain simply. I have seen the code for myself, and even if it is not easy to refactor the oversight, this is the spec. The argument given is one from an implementation perspective and has no weight given the spec wasn't respected. The limitation of tomcat must be fixed. I'm about to try this 5.5.x without 1.5... Last time, I checked, it wasn't working. Please don't waste your time reopening the report. An invalid HTTP request cannot be mapped, and thus cannot be processed according to the Servlet specification. |