The superclass javax servlet http HttpServlet was not found on the Java Build Path
以下是我的解决方法:

eclipse中的解决方法

右击项目->Build Path->Add Library->Runtime->选择Tomcat Server->finish
这样jsp页头的小红叉就会消失

可能会在选择Tomcat Server的时候没有tomcat可选择,这时就需要重新下载配置tomcat

通过maven解决

如果在maven web项目中碰到这样的问题
在pom.xml中加入ServletAPI依赖

	<dependency>
		<gruopId>javax.servlet</gruopId>
		<artifactId>servlet-api</artifactId>
		<version>2.5</version>
		<scope>provided</scope>
	</dependency>

相关文章:

  • 2021-12-02
  • 2021-10-18
猜你喜欢
  • 2021-05-17
  • 2021-11-18
  • 2021-10-04
  • 2021-04-17
相关资源
相似解决方案