Problems and Solutions

Compile Errors

The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

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

The_superclass_%E2%80%9Cjavax.servlet.http_.HttpServlet%E2%80%9D_was_not_found_error-1024x715.png