Maven项目报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

刚刚新建完Maven项目,一般都会报这个错误,原因是没有默认添加需要的javax.servelet的jar包,所以打开pom.xml文件添加如下dependency即可:

 <dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>servlet-api</artifactId>
   <version>2.5</version>
 </dependency>
原文地址:https://www.cnblogs.com/wytings/p/4585837.html