The error message in index.jsp in the MAVEN Web project is as follows:
The superclass "Javax.servlet.http.HttpServlet" is not found on the Java Build Path
As you can see from the error message, the class cannot be found, that is, the corresponding jar package cannot be found.
So the solution is to refer to the corresponding JAR package.
Premise:
You need to set up server Runtime,
Windows, Perferences, Server, Runtime environments, ADD, Apache Tomcat ... so you can do it step by step.
Workaround for this problem:
Project right-build path---Configure build path---Libraries---add Library---Server Runtime---select through the above steps above Server, and then click Apply.
You can see the errors on the JSP page disappear.
But you will also find that there is a small red fork on the project, which resolves as follows:
First view markers information (window–>show veiw–>markers)
The error message is:
Project configuration is not a up-to-date with pom.xml. Select:maven->update Project ... from the project context menu or by use Quick Fix.
Follow the steps to solve the problem! (Project right-click Maven, Update Project)
New MAVEN Web project in Eclipse Error: the superclass "Javax.servlet.http.HttpServlet" is not found on the Java Build Path