I want to know if there is a way to download the generated HTML from a Struts2 action (the final HTML after processing the jsp), using the normal result types. I don't want de page to be displayed, but instead to download it.
What I have tried:
<result name="success" type="stream">
<param name="location">/jsp/dummy.jsp</param>
<param name="contentType">application/text</param>
<param name="contentDisposition">attachment; filename="page.html"</param>
</result>
I don´t want to use something like:
UrlReader.read("generateHTMLAction")
and putting that in an input stream, because I'm having some encoding issues. Any idea will be apreciated. Thank you everyone.