The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
Adding the tomcat server in the server runtime will do the job :
Project Properties-> Java Build Path-> Add Library -> Select "Server Runtime" from the list-> Next->Select "Apache Tomcat"-> Finish
Adding below dependency in pom.xml, worked for me.
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
I too received the same error as quoted below:
The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path.
I followed these steps to resolve the issue:
- Right Click on Project
- Select Properties
- Select Project Facets
- Select Apache Tomcat as Runtime server
- Click OK