• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
5 views

Problem :

I created a project by Maven integration in Eclipse , but in the work space in all JSP files have bellow message:

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

by (6.9k points)  

1 Answer

0 votes

Solution :

1. For an Ant project:

Please make sure you have servlet-api.jar in the lib folder.

2. For a Maven project:

Please make sure you have the dependency added in POM.xml.

<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>javax.servlet-api</artifactId>
  <version>3.1.0</version>
  <scope>provided</scope>
</dependency>

3. Another way to do it is

Please update the project facets to pick up the right server.

Please check this box in this location:

Project → Properties → Target Runtimes → Apache Tomcat (**any server**)

by (21.9k points)  
...