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

HFSJ Ch5 question 1: Does ServletOutputStream.write() auto flush?

 
Will Lee
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For RequestDispatcher's IllegalStateException, The errata correct the answer of this question by adding choice C. write.
I'm confused: on page p205 the book only blames os.flush() for causing this exception. I remember the earlier page said you can do whatever (including write() ) but flush(). So why write() will cause this problem?

Is it possible that os.write() after rd.forward() will also cause IllegalStateExc.?
 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

this

thread

might help....
 
Will Lee
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. I got the answer. Yes, I forget if no buffer or buffer is full.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic