jsp页面报The superclass “javax.servlet.http.HttpServlet“ was not found on the Java Bu错的解决方法

在初学java Wed 时,在导入外部Wed项目资料时,往往资料中给的静态文件引jsp文件夹,但是每个文件都报红的现象,然后在jsp文件里面出现了The superclass"javax.servlet.http.HttpServlet" was not found on the Java Build Path错误异常。异常分析:可能是在Javaweb工程下没有引入中间件(服务器Tomcat)运行的library
这时首先确认eclipse中server的运行环境是否有配置,设置方法为:Window–>Preferences–>Server–>RuntimeEnvironments–>Add–>选择Apache的版本后点Next,再填入安装的Apache Tomcat软件的安装目录 jsp页面报The superclass “javax.servlet.http.HttpServlet“ was not found on the Java Bu错的解决方法

选择Apache的版本后点Next,再填入安装的Apache Tomcat软件的安装目录
jsp页面报The superclass “javax.servlet.http.HttpServlet“ was not found on the Java Bu错的解决方法

(2)右击web工程–>Build Path–>Configure buildpath–>Java Build Path -->Libraries–>Add Library–>ServerRuntime–>Next–>Apache Tomcat Server—Finish

jsp页面报The superclass “javax.servlet.http.HttpServlet“ was not found on the Java Bu错的解决方法

jsp页面报The superclass “javax.servlet.http.HttpServlet“ was not found on the Java Bu错的解决方法