I have the following dependency in my pom.xml so that my IDE (IntelliJ) has the servlet-api classes available during compilation, but not provided in the build.
For me same error came. I found old version of Servlet (2.5) existed in my path along with servlet 3.0. Once i remove(exclude) old version my issue solved.