The following is from the J2EE Docs for HttpServletResponse.sendError() and HttpServletResponse.sendRedirect():
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.
Hence, the final output written should be considered to throw an IllegalStateException
[ June 21, 2004: Message edited by: Vijay Albuquerque ]