When writing your first JSP code in Eclipse, you may face this error: The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path . In this tutorial, we will see how to fix this issue.
Right Click on the Project ❯ Properties ❯ Project Facets. You would be presented with the screen that would look similar to the following screen. On the right hand side, you would see two tabs: Details and Runtimes. Click Runtimes tab ❯ Check the Apache tomcat server ❯ Apply ❯ Ok
That’s it. This would solve the error.