I am using struts and my application downloads data to the browser in a PDF file. To make sure the download was successfull I close the stream or flush it. Now I want to continue with my session by forwarding to another Struts action, unfortunately when the request is closed you cannot do a thing. Is there a way to move to another Structs action in this scenario?
what if you want to give the user a confirmation screen with additional info.
One possible solution would be to have your action forward to a confirmation page instead of directly returning the PDF file output stream. The confirmation page would list any additional information you want to give, and also provide a link to perform the actual download. In the link, specify target="_blank" so that the PDF is rendered to a new window. Once the user closes the PDF window, your original confirmation page is still available for the user to navigate back to other pages in your application.
If you want it to be more automatic than that, here's another option: