• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Redirect to JSP after file download ?!

 
moh sak
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

what i want to accomplish is the following :

1- Download a file using (response.SendRedirect(URL) ). there is nothing wrong in here.

2- Redirect the user to another JSP page to display a thanks message for downloading the file. "Who to Do ??!"

as known i can't use the sendRedirect again because the request is commited.

is there any way to reditrect to the JSP ??
or i should redirect the user to the JSP and in it call the download file servlet ?? "which i don't prefer"


thanx in advance.
moh Sakkijha
 
Jon Emerson
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What most web sites do is redirect to the "thank you" page FIRST, and have the thank you page redirect the user to the requested file to download via a meta refresh.

A simple implementation of this is:

 
moh sak
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

thanks for your reply, i did this because i figure out that its the only way to redirect.

Thanks again
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic