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>