Summary: | Improve HttpServletResponse#sendError(int) JavaDoc description | ||
---|---|---|---|
Product: | Tomcat 6 | Reporter: | Michael Osipov <michaelo> |
Component: | Servlet & JSP API | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P2 | ||
Version: | 6.0.36 | ||
Target Milestone: | default | ||
Hardware: | All | ||
OS: | All |
Description
Michael Osipov
2012-11-23 22:33:12 UTC
(In reply to comment #0) > sendError(int) methods calls sendError(int, null) internally. Thus generating a HTML > page without a message. This is not mentioned in the docs. One could assume > that the response will be empty. The sendError() method behaviour is defined by several chapters of the Servlet specification. In "Servlet 3.0 Rev a": a) ch.5.3 Convenience Methods b) ch.10.9 Error Handling It does not matter much which of sendError(..) methods is called. > seems to be a verbatim copy of Oracle's Servlet API It is the other way around. The origin is in the old times when Tomcat was the reference implementation. Tomcat Javadocs were maintained as the official ones at that time. (In reply to comment #1) > (In reply to comment #0) > > sendError(int) methods calls sendError(int, null) internally. Thus generating a HTML > > page without a message. This is not mentioned in the docs. One could assume > > that the response will be empty. > > The sendError() method behaviour is defined by several chapters of the > Servlet specification. In "Servlet 3.0 Rev a": > > a) ch.5.3 Convenience Methods > b) ch.10.9 Error Handling > > It does not matter much which of sendError(..) methods is called. > > > seems to be a verbatim copy of Oracle's Servlet API > > It is the other way around. The origin is in the old times when Tomcat was > the reference implementation. Tomcat Javadocs were maintained as the > official ones at that time. Well, this does not mean that we cannot improve the doc for sendError(int). I dont think that one has to read the spec to understand what a method really does. That's the purpose of JavaDoc actually, at least to me. Fixed in trunk, 7.0.x and 6.0.x. Will be included in 7.0.34 and 6.0.37. |