The superclass "javax.servlet.http.HttpServlet" was not found 问题解决

项目中报" The superclass "javax.servlet.http.HttpServlet" was not found "这个错误,是因为缺少tomcat-servlet-api这个jar导致的

在pom中加上:

<dependency>
     <groupId>org.apache.tomcat</groupId>
     <artifactId>tomcat-servlet-api</artifactId>
     <version>7.0.63</version>
</dependency>

这个依赖即可.

原文地址:https://www.cnblogs.com/onmyway20xx/p/7234042.html