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

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

刚配置好JSP环境写第一个页面的时候,eclipse可能会提示这个上面的错误The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path,对于新手来说可能不知道怎么解决,下面说一下解决办法。

  • 首先在你的项目文件夹上右键,选择Build Path->Configure Build Path,如下图

配置Build Path

  • 然后选择Libraries->Add Library...

![Libraries]

  • 选择Server Runtime

Server Runtime

  • 选择tomcat服务器

选择tomcat服务器

  • 确定后点击Apply and Close保存即可,这时就没有了错误提示。

没有错误提示

posted @ 2017-08-12 19:06  凭栏知潇雨  阅读(156)  评论(0编辑  收藏  举报