我遇到的问题:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

在创建jsp页面时,页面发出了这个错误,解决方法:

右键点击项目-->properties-->java Build Path-->Libraies-->Add Libraies

我遇到的问题:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path


选择Server Runtime-->Apache Tomcat

我遇到的问题:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path


Finish,完成.


如果没有添加Tomcat到eclipse需要添加tomcat:

右键点击项目-->properties-->Targeted Runtime-->New

我遇到的问题:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path


选择Apache-->Tomcat (版本号),这里要选择你下载的tomcat版本

我遇到的问题:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path


选择号版本后点击next,配置tomcat文件夹的位置

我遇到的问题:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

点击FInish,完成Tomcat添加.