The error you are getting is because servlet-api needs to be on compile time build path, at runtime your app will have the servlet-api available from tomcat/lib
So add it to your build path simply, In short servlet-api
is required at compile aswell as runtime