Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on Attributes and Listeners

 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In HFSJ, I found a question in page 209 which I was unable to understand on Attributes and Listerners. The Question is:
When using a RequestDispatcher, the use of which methods can often lead to an IllegalStateException?
A. read
B. flush
C. write
D. getOutputStream
E.getREsourceAsStream.

The answer is B.
Can you please tell me as how the answer is 'B'.
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After the response has already been flushed using response.flush(), if you use
RequestDispatcher, you get IllegalStateException.

Thanks,
 
Padma priya Gururajan
Ranch Hand
Posts: 437
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic