问题1:
No result defined for action cn.edu.hgu.web.action.CustomerActio
原因:form表单没有设置属性enctype
解决: 上传文件的form需加上属性enctype=”multipart/form-data”
问题2:
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (2167602) exceeds the configured maximum (2097152)
原因:上传文件的大小超出了设置
解决:在Struts.xml文件中配置大小,如下图所示。
问题3:设置文件上传的格式
解决:在Struts.xml文件中标签action中配置属性,如下图所示。