Java – stream result using struts 2
•
Java
I tried to use stream results to return images from a struts 2 application I seem to be having trouble configuring the operation This 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 seems to be the inputname parameter. According to the document:
I'm not sure where I should put it My mistake is:
Has anyone used it before? Any suggestions?
thank you.
Solution
I believe your contentdisposition is wrong. It should be:
<param name="contentDisposition">attachment; filename="${filename}"</param>
(Chris)
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码