|Home > Guides > Core Developers Guide > Result Types > Stream Result|
A custom Result type for sending raw data (via an InputStream) directly to the HttpServletResponse. Very useful for allowing users to download content.
If you are running your app server under HTTPS and having issues with PDF's or other file streams you should take a look at HTTPS and IE Issues
inline, values are typically attachment;filename="document.pdf".
no-cahce, and prevent client from caching the content (default =
These parameters can also be set by exposing a similarly named getter method on your Action. For example, you can provide
getContentType() to override that parameter for the current action. To do it you you must explicitly define this param as an expression i.e.
Please be aware that this was changed since Struts 2.5.2, previously each parameter was automagically resolved by looking throughout the
ValueStack, now you must explicitly define wich parameter must be evaluated, even
To configure Actions and Results with Annotations you need to activate the Struts2 Convention Plugin in your Struts2 application.