Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

IllegalStateException does not happen. Why not?  RSS feed

 
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!