Quick tip for Intellij Idea users: manage your dependencies order
Recently I was developing project on top of Servlet API 3.0 and GWT 2.1 and faced the following problem: When I wanted to use async support from Servlet 3.0, Idea was unable to resolve method startAsync for HttpServletRequest.
Like this:
It turns out that gwt-dev-2.1.0.jar contains Servlet API 2.4 (looks like it comes with jetty or tomcat gwt dependencies) and Idea uses it for inspections and autocomplete.
Solution is simple: Check if servlet api 3.0 jar comes after gwt-dev-2.1.0.jar in yout project module dependencies (meta+; shortcut), like this:
And swap them using “Move Up”|”Move Down” keys, than hit OK button. After that Idea will resolve Servlet API as expected: