Facing java.lang.NoSuchMethodError: HttpServletRequest.getParts()Ljava/util/Collection

你说的曾经没有我的故事 提交于 2019-11-29 15:32:00

javax.servlet.http.HttpServletRequest.getParts() is only available starting with Servlet API 3.0

Things to check:

  • Be sure you are running Jetty 9 (or newer)
  • Make sure you have your WEB-INF/web.xml configured to use Servlet API 3.0 (or newer)
  • Make sure your build tool is using the servlet-api 3.1 (or newer) jars.
  • (Optionally) Make sure you have the same servlet api 3.1 jar in your WEB-INF/lib directory.

I encountered the same issue. It happened when I switched to Tomcat 6. When I switched back to Tomcat 7, the issue disappeared.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!