1、The superclass “javax.servlet.http.HttpServlet”
was not found on the Java Build Path
有两种解决方式:
①右键Build Path -> 找到Libraries -> Add Libriry -> Server Runtime -> Apache Tomcat v8.5 -> Finish
②在pom.xml中添加依赖
javax.servlet
javax.servlet-api
3.1.0
provided
2、右键Show In -> System Explorer -> 找到.settings中的
org.eclipse.wst.common.project.facet.core ->
把中的version改为3.1