• Register
0 votes
33 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.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**)

36.1k points

Related questions

1 vote
2 answers 41 views
41 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 Gavin 15.2k points
0 votes
1 answer 22 views
22 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 Raphael Pacheco 3.2k points
1 vote
1 answer 73 views
73 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 Gavin 15.2k points
0 votes
2 answers 55 views
55 views
Problem : I want to compile a project in Eclipse using the m2eclipse. I set my JDK path in Eclipse as below: Windows-->preferences-->installed jres--> jdk1.7.xx path But this is showing me below error [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ ... BUILD FAILURE [INFO] ------------------------------------------------------------------------
asked Feb 4 jwilliam 3.9k points