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

我们在利用Eclipse进行Java web开发时,可能会出现这样的错误:The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path。我们该怎么解决这个问题呢?

处理办法如下:

1、打开“配置编译路径”,如下图

2、点击“Add Library”

3、选择“Server Runtime"

4、选择”Apache Tomcat v8.0"(根据实际选择)

5、完成,关闭相关窗口。

原文地址:https://www.cnblogs.com/flycatnet/p/5916385.html