I have a problem about using Struts to download a file. I know Struts is an old technology, but my company is maintaining an old application for a customer.
So, problem is that we want a webpage to download a file. Scheme is the following : Reach for webpage > click a button > execute treatment (DB query and data selection) > produce excel file > download the file > back to initial page.
My code is working until the file download, i.e. I can download a correct excel file, but I can't go back to the original webpage.
I read this answer and others in this forum, and it seems that downloading a file and going back to original page are 2 different treatments, and that Struts can only process one...
I absolutely need those 2 treatments, so my idea is the following : When the user clicks the button on the original page, I should open another window (or even a pop-up) which will take care of the excel treatment and download, and my original page won't move, therefore I don't need to forward at the end of the treatment.
Question is, do you think this is viable ? I couldn't find a similar code here so I guess it isn't a good idea, so if you have a good practice about my need, please share it :)