我在 Internet Explorer 中为 excel 文件上传 struts 2 文件时遇到问题。它在 Chrome 和 firefox 中运行良好,但我不确定我在 IE 中缺少什么。
这是我拥有的struts配置:
<action name="uploadAction" method="submitServiceProfile" class="serviceProfileAction">
<!-- <interceptor-ref name="exception"/>
<interceptor-ref name="i18n"/> -->
<interceptor-ref name="fileUpload">
<param name="allowedTypes">application/ms-excel,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</param>
<!-- <param name="maximumSize">20480</param> -->
</interceptor-ref>
<interceptor-ref name="params">
<param name="excludeParams">dojo\..*,^struts\..*</param>
</interceptor-ref>
<interceptor-ref name="validation">
<param name="excludeMethods">input,back,cancel,browse</param>
</interceptor-ref>
<interceptor-ref name="store">
<param name="operationMode">STORE</param>
</interceptor-ref>
<interceptor-ref name="someStack"/>
<result name="success" type="redirectAction">managerPage</result>
<result name="error" type="redirectAction">managerPage</result>
<result name="input" type="tiles">homepage</result>
</action>