Author: markt
Date: Mon Nov 26 11:19:56 2012
New Revision: 1413554

URL: http://svn.apache.org/viewvc?rev=1413554&view=rev
Log:
CTR - Docs
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54198
Clarify that sendError(int) results in an HTML response.

Modified:
    tomcat/tc6.0.x/trunk/   (props changed)
    tomcat/tc6.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc6.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1413552
  Merged /tomcat/tc7.0.x/trunk:r1413553

Modified: tomcat/tc6.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java?rev=1413554&r1=1413553&r2=1413554&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/javax/servlet/http/HttpServletResponse.java Mon 
Nov 26 11:19:56 2012
@@ -131,41 +131,41 @@ public interface HttpServletResponse ext
     public String encodeRedirectUrl(String url);
 
     /**
-     * Sends an error response to the client using the specified
-     * status.  The server defaults to creating the
-     * response to look like an HTML-formatted server error page
-     * containing the specified message, setting the content type
-     * to "text/html", leaving cookies and other headers unmodified.
-     *
-     * If an error-page declaration has been made for the web application
-     * corresponding to the status code passed in, it will be served back in 
-     * preference to the suggested msg parameter. 
-     *
-     * <p>If the response has already been committed, this method throws 
-     * an IllegalStateException.
-     * After using this method, the response should be considered
-     * to be committed and should not be written to.
-     *
-     * @param  sc      the error status code
-     * @param  msg     the descriptive message
-     * @exception      IOException     If an input or output exception occurs
-     * @exception      IllegalStateException   If the response was committed
+     * Sends an error response to the client using the specified status code 
and
+     * clears the output buffer. The server defaults to creating the response 
to
+     * look like an HTML-formatted server error page containing the specified
+     * message, setting the content type to "text/html", leaving cookies and
+     * other headers unmodified. If an error-page declaration has been made for
+     * the web application corresponding to the status code passed in, it will
+     * be served back in preference to the suggested msg parameter.
+     * <p>
+     * If the response has already been committed, this method throws an
+     * IllegalStateException. After using this method, the response should be
+     * considered to be committed and should not be written to.
+     * 
+     * @param sc
+     *            the error status code
+     * @param msg
+     *            the descriptive message
+     * @exception IOException
+     *                If an input or output exception occurs
+     * @exception IllegalStateException
+     *                If the response was committed
      */
    
     public void sendError(int sc, String msg) throws IOException;
 
     /**
-     * Sends an error response to the client using the specified status
-     * code and clearing the buffer. 
-     * <p>If the response has already been committed, this method throws 
-     * an IllegalStateException.
-     * After using this method, the response should be considered
-     * to be committed and should not be written to.
-     *
-     * @param  sc      the error status code
-     * @exception      IOException     If an input or output exception occurs
-     * @exception      IllegalStateException   If the response was committed
-     *                                         before this method call
+     * Sends an error response to the client using the specified status code 
and
+     * clears the buffer. This is equivalent to calling {@link #sendError(int,
+     * String)} with the same status code and <code>null</code> for the 
message.
+     * 
+     * @param sc
+     *            the error status code
+     * @exception IOException
+     *                If an input or output exception occurs
+     * @exception IllegalStateException
+     *                If the response was committed before this method call
      */
 
     public void sendError(int sc) throws IOException;

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1413554&r1=1413553&r2=1413554&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Mon Nov 26 11:19:56 2012
@@ -43,7 +43,18 @@
 <!-- Section names:
  General, Catalina, Coyote, Jasper, Cluster, Web applications, Other
 -->
-<section name="Tomcat 6.0.36 (jfclere)" rtext="">
+<section name="Tomcat 6.0.37 (jfclere)">
+  <subsection name="Web applications">
+    <changelog>
+      <fix>
+        <bug>54198</bug>: Clarify that
+        <code>HttpServletResponse.sendError(int)</code> results in an HTML
+        response by default. (markt)
+      </fix>
+    </changelog>
+  </subsection>
+</section>
+<section name="Tomcat 6.0.36 (jfclere)" rtext="released 2012-10-19">
   <subsection name="Catalina">
     <changelog>
       <update>



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

Reply via email to