首先配置web.xml
然后
struts.xml
编写上传的action
提交上传页面upload.jsp
上传成功后显示的页面
另外还要实现国际化的,在资源文件里加入错误信息
struts.messages.error.uploading=a general error that occurs when the file could not be uploaded
struts.messages.error.file.too.large=a general error that occurs when the uploaded file is too large
struts.messages.error.content.type.not.allowed=a general error that occurs when the uploaded file does not match the expected content types specified