文档介绍:byFredWangStruts2Fileup/mon-fileupload--=newFileOutputStream(()+"\\"+());FileInputStreamfis=newFileInputStream(());byte[]buf=newbyte[1024];intlen=0;while((len=(buf))>0){(buf,0,len);};页面中:使用<s:filename=“xxx”></s:file>实现上传通过拦截器配置实现过滤Action中配置拦截器:<interceptor-refname=“fileUpload”> <paramname=“allowedTypes”>image/bmp,image/png,image/jpeg</param> <paramname=“maximumSize”>2000</param></interceptor-ref><!—必须要加上默认堆否则会出错:--><interceptor-refname=“defaultStack”/><paramname="xxxPath"></param>出错提示:使用<s:fielderror/>