• Register
0 votes
55 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

6 5 3
6,930 points

Please log in or register to answer this question.

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**)

9 7 4
38,600 points

Related questions

0 votes
1 answer 1 view
1 view
Problem: Can anyone tell me the solution of this problem? the superclass javax.servlet.http.httpservlet was not found on the java build path in jsp
asked 4 days ago Ifra 24.4k points
0 votes
1 answer 2 views
2 views
Problem: I need someone&rsquo;s help to fix it .. the superclass javax.servlet.http.httpservlet was not found on the java build path error in eclipse
asked 4 days ago Ifra 24.4k points
0 votes
1 answer 16 views
16 views
How can I solve this problem?
asked Dec 27, 2020 TeamScript 13.5k points
0 votes
1 answer 25 views
25 views
Problem: could not publish to the server. java.lang.indexoutofboundsexception
asked Feb 12 Shovo210 13.2k points
1 vote
2 answers 329 views
329 views
Problem: Dear all, Right now I&rsquo;ve imported a maven project into my eclipse IDE and I changed my java path library to work on java 1.7 Suddenly, eclipse started showing an error but I&rsquo;ve got no errors in my files there. The error is &ldquo;java compiler level ... Project Problem (Java Version Mismatch) Please tell me how to resolve this error (I want to have my JRE version as 1.7 only).
asked Mar 22, 2020 Gavin 15.3k points
0 votes
1 answer 691 views
691 views
Problem: I have very recently integrated my Tomcat 7 in Eclipse. If I start Tomcat 7 using Eclipse then it shows that my Tomcat is up and running but if I go to http://localhost:8080 in the browser then it gives me following error: HTTP Status 404 - / type Status report ... is already in use by some other service but that did not work either for me. How can I fix above error related to Tomcat 7?
asked Aug 2, 2020 Raphael Pacheco 4.9k points
1 vote
1 answer 382 views
382 views
Problem: Hello Guys, I am trying to import a Maven project in my Eclipse IDE but the project is not importing properly. It shows an error, source folder is not a java project when I m trying to give it a new call-in it. The problem is literally going over my head ... the problem, as well as have a solution, please speak up. I'm surfing over the internet for an hour but couldn&rsquo;t fix this yet.
asked Apr 2, 2020 Gavin 15.3k points
0 votes
1 answer 2 views
2 views
Problem: I'm new to Java. I have to modify this Web Servlet that is running on my Tomcat. The Webapps folder contains several files and directories, but only one .JAR file. I managed to decompile it using Java Decompiler JD-GUI, but when I create the project in ... like HttpServlet cannot be resolved to a type And I don't even know which Eclipse button rebuilds the .JAR file. Can anyone help me?
asked 4 days ago Sana8989 7.7k points