org.apache.struts.upload.FormFile
接收表单的vo有对应上传表单控件name的setter和getter方法,在后台接收时:FormFile accessFile = actionForm.getFile1(); file1为接收控件的命名;
InputStream in = accessFile.getInputStream();,接下来就可以随便操作了,无论是读取内容还是怎样!
如读取成一个临时文件:
File file = new File(fileName);
file.createNewFile(); // 创建了临时文件
FileOutputSream os = new FileOutputSream (file);