package javax.servlet.annotation does not exist
WebServlet
is added in servlet-api
version 3.0, so make sure you are using updated version and it's added in the class path of the project.
Have a look at servlet-api-2.5 classes where WebServlet.class
is not included, it's part of servlet-api-3.x classes