GeeCON Prague 2014*
The moose likes Servlets and the fly likes Regarding File Download!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Regarding File Download!!" Watch "Regarding File Download!!" New topic
Author

Regarding File Download!!

Ravi Kumar Ravuru
Ranch Hand

Joined: Apr 18, 2002
Posts: 176
Hello Folks,
Iam getting the following exception while redirecting a page after the completion of file download...
"IllegalStateException or Response already commited"
My servlet code for file download is as follows:

and jsp code is as follows:

The above exception occurs When iam redirecting the test.jsp page after completion of file download.Please help me out.
Regards,
Ravi


(edited by Cindy to format code using [ code] and [ /code] tags without the spaces)
[ May 22, 2003: Message edited by: Cindy Glass ]
Kaustubh Patil
Ranch Hand

Joined: Aug 13, 2001
Posts: 164
Whenever you are redirecting nothing should be written to the out stream of the response.
Remove the println's from your code that would be executed before the redirection.
-Kaustubh.


Kaustubh. Mumbai, India.
Ravi Kumar Ravuru
Ranch Hand

Joined: Apr 18, 2002
Posts: 176
Hello Kaustubh Patil,
Thanks for your reply.
"Remove the println's from your code that would be executed before the redirection."
Would u like to point out in the code where you are referring to the above statement?Awaiting your reply.
Regards,
Ravi
 
GeeCON Prague 2014
 
subject: Regarding File Download!!