I am trying to use Stream Result to return an image from a struts2 application. I seem to have problems setting up the action. Here is the configuration:
<result name="success" type="stream"> <param name="contentType">image/jpeg</param> <param name="inputName">inputStream</param> <param name="contentDisposition">filename="${filename}"</param> <param name="bufferSize">1024</param> </result>
The problem is the inputName parameter, which according to the docs:
the name of the InputStream property from the associated action (default = inputStream).
I'm not sure which name I should put there. The error I am getting is:
Cannot find java.io.InputStream named [inputStream] in the call stack.
Has anyone used this before? Any tips?
Thanks.
source share