使用此代码将图像上传到mysql
Part filePart = request.getPart("photo");
if (filePart != null) {
// prints out some information for debugging
System.out.println(filePart.getName());
System.out.println(filePart.getSize());
System.out.println(filePart.getContentType());
// obtains input stream of the upload file
inputStream = filePart.getInputStream();
}
编译给出错误
The method getPart(String) is undefined for the type HttpServletRequest
如何解决这个问题?