>  and we have 2:
>  AbortWithWebErrorCodeException

Uses HttpServletResponse#sendError

>  AbortWithHttpStatusException

Uses HttpServletResponse#setStatus

>  why 2? i dont know i think we need to clean up here.... (eelco? igor? who
>  was first ;) )

>From HttpServletResponse#setStatus:

     * Sets the status code for this response.  This method is used to
     * set the return status code when there is no error (for example,
     * for the status codes SC_OK or SC_MOVED_TEMPORARILY).  If there
     * is an error, and the caller wishes to invoke an error-page defined
     * in the web application, the <code>sendError</code> method should be used
     * instead.
     * <p> The container clears the buffer and sets the Location
header, preserving
     * cookies and other headers.

>From HttpServletResponse#sendError:

     * 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.

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to