If the output stream was not buffered at the time of transferring the control, the jsp:forward action will throw java.lang.IllegalStateException. Why?

Dmitry Ivlev

The server has already had written out some text or header information to client and thus cannot send the second HTTP response after the forward action. Make sure you do not set cookies or write a message to the client before you invoke the forward action within the JSP page.