NOTE:if the response was *committed*, but if it is not, just imagine, some default buffer exists in servlet container implementation, then buffer contents just lost.
3. Servlet specification does *not* mandate any default buffer for HttpServletResponse, so if you see on the exam a question about sendRedirect behaviour after you wrote anything to writer - you should select IllegalStateException answer and don't assume that any buffer will handle the situation.
NOTE: JSP *does* have a default buffer which is defined in specification at size 8kb.
4. Tomcat servlet container has a HttpServletResponse implementation with a default buffer, so that's why you don't see exception during sendRedirect test example.
5. To reproduce the *expected* behaviour, just add 'ServletResponse.flushBuffer' before calling 'sendRedirect' You should get an exception in this case as written in java docs.
5.a. As an alternative - you might try 'public void setBufferSize(int size)' before writing to writer.
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz Exam 1Z0-810: Upgrade to Java SE 8 Programmer Study Guide and Quiz