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>

 

posted @ 2015-06-18 14:43  RexWei  阅读(591)  评论(0编辑  收藏  举报