[
https://issues.apache.org/struts/browse/WW-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
S. Farshi updated WW-2711:
--------------------------
Priority: Minor (was: Major)
> Support for setting contentDisposition dynamically for stream result type
> -------------------------------------------------------------------------
>
> Key: WW-2711
> URL: https://issues.apache.org/struts/browse/WW-2711
> Project: Struts 2
> Issue Type: Improvement
> Affects Versions: 2.0.11.1, 2.0.11.2, 2.1.0, 2.1.1, 2.1.2
> Reporter: S. Farshi
> Priority: Minor
>
> I am using struts 2.0.11.1 and I just realized that I can not set
> contentDisposition dynamically. I ended up exteding the StreamResult type to
> allow this functionality. It would be worthwile if the StreamResult code is
> modified to allow this. It will only be a few lines of code. Bellow is my
> extension:
> public class DynamicStreamResult extends StreamResult {
> @Override
> protected void doExecute(String finalLocation, ActionInvocation
> invocation)
> throws Exception {
> String filename = (String) invocation.getStack().findValue(
> conditionalParse("name", invocation));
> contentDisposition = "filename=\"" + filename + "\"";
> super.doExecute(finalLocation, invocation);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.