java 上传word2007办公文件 struts配置

java 上传word2007办公文件需要 struts配置

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <package name="default" extends="struts-default"> <interceptors> <interceptor-stack name="myDefaultStack"> <interceptor-ref name="exception" /> <interceptor-ref name="alias" /> <interceptor-ref name="servletConfig" /> <interceptor-ref name="i18n" /> <interceptor-ref name="prepare" /> <interceptor-ref name="chain" /> <interceptor-ref name="debugging" /> <interceptor-ref name="profiling" /> <interceptor-ref name="scopedModelDriven" /> <interceptor-ref name="modelDriven" /> <interceptor-ref name="fileUpload">

   <!-- 下面最后两个逗号就是高版本word2007和电子表格2007 ppt的没加  需要的话可以网上查 -->

      

<param name="allowedTypes"> application/pdf,image/bmp,image/png,image/gif,image/pjpeg,image/jpg,application/msword,application/vnd.ms-excel,application/actet-stream,application/zip,application/x-zip-compressed,application/rar,application/octet-stream,text/plain,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet </param> <param name="maximumSize">90485760</param> </interceptor-ref> <interceptor-ref name="checkbox" /> <interceptor-ref name="staticParams" /> <interceptor-ref name="actionMappingParams" /> <interceptor-ref name="params"> <param name="excludeParams">dojo\..*,^struts\..*</param> </interceptor-ref> <interceptor-ref name="conversionError" /> <interceptor-ref name="validation"> <param name="excludeMethods">input,back,cancel,browse</param> </interceptor-ref> <interceptor-ref name="workflow"> <param name="excludeMethods">input,back,cancel,browse</param> </interceptor-ref> </interceptor-stack> </interceptors> <default-interceptor-ref name="myDefaultStack"></default-interceptor-ref> <global-results> <result name="exception">/page/error/exception.jsp</result> </global-results> <global-exception-mappings> <exception-mapping exception="java.lang.Exception" result="exception" /> </global-exception-mappings> </package> </struts>

你可能感兴趣的:(java,struts,word2007)