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
posted @ 2017-05-24 17:01  D-Dong  阅读(218)  评论(0编辑  收藏  举报