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.
You can also have it with a mixture of grizzly and jetty dependencies.