I'm using Eclipse Mars.1 for Web development, I got this error by including a file JSP
, The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
.
I also have Tomcat 8 running on the PC.
I'm using Eclipse Mars.1 for Web development, I got this error by including a file JSP
, The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
.
I also have Tomcat 8 running on the PC.
As with the database, Eclipse does not recognize the Apache Tomcat service just because it is present on the system, a plugin for < strong> Eclipse .
The error should have gone away, trying to fix the problem, before I installed Eclipse a Tomcat plugin and Jboss Apache Tomcat Integration software , but I do not know how far these are needed.
The solution I found was a bit different, and I'll leave it here as just adding the server and changing Project Facets did not help me:
<dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency>
Good evening personal
The solution to add the dependency in Maven also solves it. Just to help, it can be solved the first way it was suggested by adding the Target Runtime in Project Facets. It turns out that after doing this, you must also configure the project to use the libraries of the server in question. To do this, go to the Build Path settings, on the "Libraries" tab, click the "Add Library" button, select "Server Runtime" and then the Server you used, in my case "Tomcat 7.0" Then just apply and that's it.