Chapter 5, page 209, mock exam question #1 asks:
"When using a requestDispatcher, the use of which method can often lead to an
IllegalStateException (choose all that apply):
A. read
B. flush
C. write
D. getOutputStream
E. getResourceAsStream
The correct answer is given as B, but I would have though the answer should have been B *and* C.
Couldn't writing 'theoretically' cause the response to be commited and hence cause and IllegalStateException if we try and forward the request?
Or is it in the specification that nothing is sent to the browser until flush() is called or the
servlet's service method returns?