Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding File Download!!

 
Ravi Kumar Ravuru
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ravi Kumar Ravuru
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic