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

导致原因:Javaweb工程类中没有添加Tomcat运行时相关类。
 
解决方法:
  • 右击 web 工程 -> Properties 或 Build Path -> Configure Build Path -> Libraries -> Add Libray -> Server Runtime -> Tomcat
  • 若打开 Server Runtime 后一片空白,需要设置 Apache 服务器。设置方法为:window -> Preferences -> Server -> Runtime Environment -> add
原文地址:https://www.cnblogs.com/-1307/p/6899866.html