Hi Guys,
I have been going through the HFS&J book and the
servlet spec and am trying to figure out when the
IllegalStateException will be thrown.
So far, I have found that if the response stream is committed any other attempt to write to it will result in an IllegalStateException, except if it is after a sendError or sendRedirect, in which case it will simply be ignored.
Also any attempt to add a header or content type to the response after it is committed will be ignored.
Any other attempt to write to the response stream will result in an IllegalStateException.
Am I write about this? Are there any other exceptions to the rule?
Thank you for your help. Much appreciated.
Regards,
James.