【发布时间】:2015-04-24 15:43:34
【问题描述】:
我在 Internet Explorer 中为 Word 文件(.docx、.doc)上传 Struts 2 文件时遇到问题。它在 Chrome 和 Firefox 中运行良好,但我不确定我在 IE 中缺少什么。 我正在使用 IE9。 感谢您的建议。
<action name="saveOrUpdateUser" method="saveOrUpdate"
class="com.adaptivsol.action.UsersAction">
<interceptor-ref name="defaultStack">
<param name="fileUpload.maximumSize">104857600</param>
<param name="allowedTypes">
text/plain,
application/word,
application/msword,
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
application/vnd.openxmlformats-officedocument.wordprocessingml.document
</param>
<param name="allowedExtensions">doc,docx,txt</param>
</interceptor-ref>
<result name="success">./pages/login/register.jsp</result>
<result name="input">./pages/login/register.jsp</result>
<result name="error">./pages/login/register.jsp</result>
</action>
【问题讨论】:
-
您在使用 IE9 时遇到了什么问题?请更新问题,说明它是如何不工作的。谢谢!
-
这是一个文件上传功能。该文件使用 Fire Fox 和 Chrome 浏览。在 Internet Explorer 上,拦截器会阻止提交操作。我尝试了几个版本的拦截器,甚至完全删除了它,它们都在 Chrome 上工作,但在 IE9 上没有运气。
标签: file-upload struts2 internet-explorer-9