The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path
原创 thinkJava 发表于:2018-05-30 17:19:08
  阅读 :164   收藏   编辑

maven javaweb项目页面有红叉,提示:

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

解决方法:

pom.xml新增依赖:

 <dependency>
	<groupId>javax.servlet</groupId>
	<artifactId>javax.servlet-api</artifactId>
	<version>3.1.0</version>
	<scope>provided</scope>
</dependency>

<dependency>
	<groupId>javax.servlet.jsp</groupId>
	<artifactId>jsp-api</artifactId>
	<version>2.2</version>
	<scope>provided</scope>
</dependency>