I have a problem regarding successive 'action forwards' or redirects using Struts.
From page 1, the user selects a document from a list. The document info is then stored and the user is forwarded to page 2. The user is then asked to accept some terms and conditions on page 2 by clicking the following link: <a href="/media/submitMediaItem.do?submitAction=tcAccept">
This calls an action that opens a document on the file system using the configured application to handle the file type. The document is either then opened or saved.
The state of the web app remains on page 2. I need to automatically go back to page 1 but last action called has taken me 'out of the loop' and there's no way to get back because nothing is returned once the forward to open the document has been called.
You are basically requiring the server to return 2 responses, one to send the file and one to send the user back to page one.
To get 2 responses, you need to send 2 requests to the server and that will probably require 2 browser windows if this is to happen concurrently. The second window could be an automatic redirect to the request that returns the file and the window could close after that request completes.