aspose 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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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".
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sendRedirect() javadoc
 
Similar Threads
How can one say response is committed!
Regarding request disptacher
sendRedirect method
JSP redirect
forward Vs redirect