Struts2上传文件即

时间:2014-04-10 13:57:53

标签: java jsp internet-explorer struts2

在我的struts2应用程序中,我正在使用“文件上传拦截器”,但是Internet Explorer无法正常工作。在firefox本身,还有chrome

<s:file name="upload" id="upload" />

<action name="GuardarAdjunto" class = "ArchivosAdjuntos" method="guardar">

       <interceptor-ref name="fileUpload">
        <param name="allowedTypes">
            text/plain,
            application/pdf,
            application/word,
            application/msword,             
            application/vnd.ms-excel,
            application/msexcel,
            application/x-msexcel,
            application/x-ms-excel,
            application/x-excel,
            application/x-dos_ms_excel,
            application/xls,
            application/x-xls,
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
            application/vnd.openxmlformats-officedocument.wordprocessingml.document
         </param>
         <param name="maximumSize">2000000</param>
        <param name="allowedExtensions">pdf,xls,doc,docx,xlsx,txt</param>
    </interceptor-ref>              
       <interceptor-ref name="basicStack"/> 
    <result name="input">adjuntos.jsp</result>
    <result name="error">adjuntos.jsp</result>                      
    <result type="chain">
        <param name="actionName">ArchivosAdjuntos_</param>
        <param name="namespace">/contratos/plantilla</param>
    </result>         
</action>

为什么不在Internet Explorer上工作? 任何解决方案?

0 个答案:

没有答案