The method getServletContext() is undefined for the type HttpServletRequest

request.getServletContext().getRealPath("/")

已经加入了 sun runtime library但是还是提示错误

是因为 写法过时了改成 request.getSession().getServletContext().getRealPath("/")

猜你喜欢

转载自blog.csdn.net/weixin_43520099/article/details/106661626