File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes sendRedirect() javadoc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "sendRedirect() javadoc" Watch "sendRedirect() javadoc" New topic
Author

sendRedirect() javadoc

vani venkat
Ranch Hand

Joined: Nov 21, 2006
Posts: 142
hi
can some one explain meaning of
If the response has already been committed, this method throws an IllegalStateException. After using this method, the response should be considered to be committed and should not be written to.
it is given in javadoc of sendRedirect method.
does that mean, we should not call flush() on response once we call sendRedirect? or we should not even try to write into response?


SCJP 1.4, SCWCD 1.5
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi, Vani. Yes. If flush() is called the response is commited(closes the underlying stream).
vani venkat
Ranch Hand

Joined: Nov 21, 2006
Posts: 142
thanks chinmaya for clarifying. i got a doubt by reading that "written to".
 
Don't get me started about those stupid light bulbs.
 
subject: sendRedirect() javadoc