Most of the time Java Web Developers are facing the problem that
javax.servlet.http.HttpServlet was not found in Java Build Path while using the Eclipse IDE.
This tutorial will explain about how to resolve this problem. When you have created a new project in Eclipse IDE then servlet jars are not associated with your project or you can say that your project is not mapped with Tomcat server. This is the only reason to facing with this error while creating the JSP pages.
Step- 1: Go to your project and hit the Right Click.
Step- 2: Now click on Build Path » Configure Build Path…
Step- 3: When you clicked on the Configure Build Path… a popup window will open. On left side there is bunch of list. In that list find the Project Facets click on it.
Step- 4: After clicking on Project Facets, there is a tab Runtimes on right side click on it.
Step- 5: Check the Apache Tomcat Server
Strep- 6: Apply » Ok