Page 1 of 1

Re: About Question enthuware.jwpv6.2.956 :

Posted: Wed Jan 09, 2013 5:53 pm
by gurpreet_asrgndu
sendError or sendRedirect does throws IllegalStateException when the response is committed. i.e. flushed sent to the client. in case the response is in buffer, it is cleared and appropiate headers/response is set corresponding to the method used. in the question we never used flush() so that the call to sendError will wipe out the buffer and set its own response WITHOUT throwing IllegalStateException

Re: About Question enthuware.jwpv6.2.956 :

Posted: Thu Jan 10, 2013 7:05 am
by admin
One should not depend on flush. If the response is bigger than the buffer, it would have been flushed anyway. You don't know the buffer size either.

HTH,
Paul.