You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by roger <ro...@googlemail.com> on 2011/09/19 15:40:30 UTC

Is it possible to redirect after a Stream result action has completed?

Hi

I have a .jsp page that contains a link. When the link is clicked an action
is called that uses the stream result to download a data file to the client
pc. When the action is complete and all the browser generated download
dialogs have been cleared, the original .jsp that contains the download link
is still displayed. I would like to be able to "redirect" to another page
once the download has completed. Is this possible and if so pointers as to
how I go about it would be welcome.

Regards

--
View this message in context: http://struts.1045723.n5.nabble.com/Is-it-possible-to-redirect-after-a-Stream-result-action-has-completed-tp4819005p4819005.html
Sent from the Struts - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Is it possible to redirect after a Stream result action has completed?

Posted by Li Ying <li...@gmail.com>.
I guess you can not do this.

Because there should be ONLY ONE HTTP response for every HTTP request.
So you can only return a file downlod or a redirect to the client, but not both.

If you want to jump to another page after file download,
may be you can try JavaScript solution in the client side.

AJAX and JavaScript is very powerful today,
If you can't implement something in the server side,
maybe there are another solution in the client side.


2011/9/19 roger <ro...@googlemail.com>:
> Hi
>
> I have a .jsp page that contains a link. When the link is clicked an action
> is called that uses the stream result to download a data file to the client
> pc. When the action is complete and all the browser generated download
> dialogs have been cleared, the original .jsp that contains the download link
> is still displayed. I would like to be able to "redirect" to another page
> once the download has completed. Is this possible and if so pointers as to
> how I go about it would be welcome.
>
> Regards
>
> --
> View this message in context: http://struts.1045723.n5.nabble.com/Is-it-possible-to-redirect-after-a-Stream-result-action-has-completed-tp4819005p4819005.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org