action 传递其他类型的参数
请问 我用struts上传了一个文件后,在上传文件的Action里有 参数
File upload; 和String savePath;等
但我要重定向到里一个Action并传递参数 upload和savePath 即文件流和存储路径,
struts.xml里这样写的:
<action name="doUpload" class="org.mybatis.education.action.file.FileUploadAction">
<interceptor-ref name="fileUpload">
<param name="allowedTypes">
image/bmp,image/png,image/gif,image/jpeg,image/jpg,text/plain,text/html,application/octet-stream,application/vnd.ms-powerpoint,application/msword,application/vnd.ms-excel,application/actet-stream,image/x-photoshop,application/xml,application/zip <!-- image/bmp,image/png,image/x-pgn,image/gif,image/jpg-->
</param>
<param name="maximumSize">1024000</param>
</interceptor-ref>
<interceptor-ref name="defaultStack"/>
<param name="savePath">/upload</param>
<result name="input">/pages/Upload.jsp</result>
<result name="success" type = "redirectAction">
<param name = "actionName">files_manage_model_store_file</param>
<param name="upload">${upload}</param>
<param name="savePath">${savePath}</param>
</result>
</action>
问题:
为什么文件传不过去,文件流不能通过这个方式传递吗?
------解决方案--------------------
type = "redirectAction"只有基本类型才能传递,其实就是URL传值 ,File对象当然传不过去啊,改为type="chain"试下