maven新建web项目提示The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

 

maven新建web项目提示The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

 

在pom.xml中添加下面代码来下载servlet-api:

复制代码
<dependency>  
    <groupId>javax.servlet</groupId>  
    <artifactId>servlet-api</artifactId>  
    <version>2.5</version>  
    <scope>provided</scope>  
</dependency>  

 

posted @ 2017-12-07 11:56  搜索技术  阅读(202)  评论(0编辑  收藏  举报