I have a web application written using freemarker, webwork and java. Now when user clicks on "getReport", java code returns the string variable (named "otchet") which contains the whole report in plain text and the following page is displayed:
simple.ftl:
<#if (otchet?exists)>
${otchet}
<#else>
<@ww.text name="report.none"/>
</#if>
It is working OK. However, I would like instead to offer user this report (contained in the variable "otchet") as a text/plain file download.
How can I solve this problem?