Tomcat WEB 项目报错 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

如果 在Eclipse 中新建的WEB 项目 出先上述 报错

就是说明该  Javaweb工程类中没有添加Tomcat运行时相关类 

右键web项目名称 - properties-Java Build Path -Libraries - Add Libray - Server Runtime 

 

Tomcat WEB 项目报错 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

next 选择 配置到 Eclipse 里的 Tomcat Server

Tomcat WEB 项目报错 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

2、切换到Java Build Path界面中的Orader and Export,选择Tomcat。

Tomcat WEB 项目报错 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path