Meaningless Drivel is fun!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes IllegalStateException does not happen. Why not? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "IllegalStateException does not happen. Why not?" Watch "IllegalStateException does not happen. Why not?" New topic
Author

IllegalStateException does not happen. Why not?

Otto Teixeira
Greenhorn

Joined: Aug 10, 2005
Posts: 12
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IllegalStateException does not happen. Why not?
 
Similar Threads
B&S 2.2.2 - Unlock()
Help needed, in Servelet
response.sendRedirect() behaviour
servlet: No return method after rd.forward?
SystemExceptions