本文主要是介绍The method parseRequest(RequestContext) in the type FileUploadBase is not applicable for the argumen,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
The method parseRequest(RequestContext) in the type FileUploadBase is not applicable for the arguments (HttpServletRequest)
原因是导入包错误
默认导入的是
import org.apache.tomcat.util.http.fileupload.FileItem;
import org.apache.tomcat.util.http.fileupload.FileUploadException;
import org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory;
import org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload;
实际要导的是
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
注意:导这个之前要先把对应的commons-fileupload.jar文件复制到WebContent\WEB-INF\lib目录下面。
这篇关于The method parseRequest(RequestContext) in the type FileUploadBase is not applicable for the argumen的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!