日期:2014-05-17  浏览次数:20674 次

struts2 文件下载错误!
发生以下错误,怎么解决:
java.lang.IllegalArgumentException: Can not find a java.io.InputStream with the name


Can not find a java.io.InputStream with the name [targetInputName] in the invocation stack. 
<action name="SU0005DownLoad" method="doDownLoad"
class="su0005Action">
<result type="stream">
<param name="contentType">${fileType}</param>
<param name="inputName">targetInputName</param>
<param name="contentDisposition">
filename=${fileName}
</param>
</result>
</action>

------解决方案--------------------
Can not find a java.io.InputStream with the name [targetInputName] in the invocation stack.




<param name="inputName">targetInputName </param> 有问题。
------解决方案--------------------
重新发布试一下,
我的也经常有这问题。
我把tomcat重新解压个,然后部署就是好的。
但说不定什么时候就又不行了。
发布到别的机器上就是行的

------解决方案--------------------
探讨
Can not find a java.io.InputStream with the name [targetInputName] in the invocation stack.


<param name="inputName">targetInputName </param>有问题。