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

当在Eclipse中导入新的JavaWeb项目时出现如下问题:

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

 

解决方法:

1、  设置Apache服务器

设置方法为:window->Preferences->Server->Runtime Environment -> add--> 选择Apache的版本后点Next,再填入你apache服务器软件的安装(解压后)地址。

2、  添加Tomcat运行时相关类

右击web工程-》属性或Build Path-》Java Build Path->Libraries-> Add Libray...->Server Runtime-》Tomcat Server

点击“ok”,即可完成设置。这样错误就会消失了

你可能感兴趣的:(The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path)