<packagename= "Default" namespace= "/" extends= "Struts-default" > <actionname= "Upload" class= "cn.itcast.user.action.FileUploadAction" method= "Upload" > <!--The parameter value of the directory in which the uploaded files are passed to the Fileuploadaction--> <paramname= "Uploadpath" >D:\</param> <!--reference FileUpload Interceptor--> <interceptor-refname= "FileUpload" > <!--set the size of a single upload file, unit bytes--> <paramname= "MaximumSize" >20000000</param> <!--set a single upload file with the extension "JPG" and multiple extensions separated by ","--> <paramname= "Allowedextensions" >.jpg</param> <!--set the MIME type of a single upload file, separated by "," between multiple types--> <paramname= "Allowedtypes" >image/jpeg</param> </interceptor-ref> <!--when the display declaration uses a specific interceptor, the 18 interceptors in the default interceptor stack do not work. If you want the interceptor in the default interceptor stack to work, you need to display a declaration using the default interceptor stack--> <interceptor-refname= "Defaultstack"/> <resultname= "Input" >/jsp/upload.jsp</result> <result>/jsp/success/upload_success.jsp</result> </action> </package> |