| Author |
Redirect to JSP after file download ?!
|
moh sak
Ranch Hand
Joined: May 11, 2005
Posts: 78
|
|
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
Joined: Feb 19, 2006
Posts: 5
|
|
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:
|
Jon Emerson<br /> <a href="http://www.jonemerson.net" target="_blank" rel="nofollow">http://www.jonemerson.net</A>
|
 |
moh sak
Ranch Hand
Joined: May 11, 2005
Posts: 78
|
|
Hi, thanks for your reply, i did this because i figure out that its the only way to redirect. Thanks again
|
 |
 |
|
|
subject: Redirect to JSP after file download ?!
|
|
|