Rectangle 27 0

jetty Facing java.lang.NoSuchMethodError: HttpServletRequest.getParts()LjavautilCollection?

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

Double check your build and WEB-INF/lib, you likely have more than 1 servlet api jar in your WEB-INF/lib directory (or in your build path if eclipse, or dependency tree if maven), one of which is an older incompatible version.

I checked all the points you mentioned, but all of them are ok, servlet-api-3.0 as well as jetty v8 are included, but not working.

Thanks a bunch for the help, I've solved the issue by taking a look carefully to the issues you mentioned.

Thanks for the quick response, I'll check it now.

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