You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2012/11/26 12:08:02 UTC

svn commit: r1413552 - /tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java

Author: markt
Date: Mon Nov 26 11:08:02 2012
New Revision: 1413552

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

Modified:
    tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java

Modified: tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java?rev=1413552&r1=1413551&r2=1413552&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java (original)
+++ tomcat/trunk/java/javax/servlet/http/HttpServletResponse.java Mon Nov 26 11:08:02 2012
@@ -116,13 +116,13 @@ 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.
+     * 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
@@ -141,11 +141,8 @@ public interface HttpServletResponse ext
 
     /**
      * 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.
+     * 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



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