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

IllegalStateException does not happen. Why not?

 
Otto Teixeira
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

According to HFSJ, I should get an IllegalStateException if I redirect or dispatch the request after writing to the response. But that is not happening.

In any servlet's doPost():


No exceptions occur. The sendRedirect statement is simply ignored.
If I remove the flush() line, then it gets redirect but still without the exception.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic