日期:2014-05-20 浏览次数:20720 次
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd"> <struts> <package name="fileupload" extends="struts-default" namespace="/"> <action name="upload" class="com.chk.action.UploadAction"> <!-- 配置fileUpload的拦截器 --> <interceptor-ref name="fileUpload"> <!-- 配置允许上传的文件类型 --> <param name="allowedTypes">image/bmp,image/png,image/gif,image/jpeg</param> <!-- 配置允许上传的文件大小 --> <param name="maximumSize">2000</param> </interceptor-ref> <!-- 配置系统默认的拦截器 --> <interceptor-ref name="defaultStack"/> <param name="savePath">/upload</param> <result name="input">/upload.jsp</result> <result>/ok.jsp</result> </action> </package> </struts>