I have the following struts def:
<result name="reportSuccessfullyDownloaded" type="stream">
<param name="contentType">application/zip</param>
<param name="contentDisposition">attachment;filename="%{filename}"</param>
</result>
It downloads a .zip file that can contain anywhere from 1-10 generated pdf reports.
What I would like to do is change the app to handle the following situations:
- If all reports were generated use the "stream" result and download the .zip file. No redirect necessary.
- If some reports were generated but others had errors, use the "stream" result and download the .zip file with the generated pdfs and then redirect to an error page where the reports that were not generated are listed.
- If no reports were generate, skip the download and redirect to an error page where the reports that were not generated are listed.
My question is: how can I have more than one "result" for a single Action? I don't see how it's possible. Is it? Or do I have to somehow have to use a "chain" result, which is highly discouraged?
Any help much appreciated.