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

Posted 心想事成

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了maven新建web项目提示The superclass "javax.servlet.http.HttpServlet" was not found on the Java Bu相关的知识,希望对你有一定的参考价值。

 

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>  

 

以上是关于maven新建web项目提示The superclass "javax.servlet.http.HttpServlet" was not found on the Java Bu的主要内容,如果未能解决你的问题,请参考以下文章