学习查错--关于在eclipse编写JSP文件时,出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java

关于在eclipse编写JSP文件时,出现The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path提示信息,开头总是“爆红”的问题解决!

学习查错--关于在eclipse编写JSP文件时,出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java
学习查错--关于在eclipse编写JSP文件时,出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java

这可能的原因是因为没有构建tomcat库文件。

学习查错--关于在eclipse编写JSP文件时,出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java
缺少:

学习查错--关于在eclipse编写JSP文件时,出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java

出现这种情况是因为先建了web工程后搭建tomcat引起的,eclipse没有自动将该tomcat的库文件添加到该工程中。解决方法如下:

步骤一:右击web工程名。

步骤二:选择Build Path---------configure build path

以下步骤图解:

学习查错--关于在eclipse编写JSP文件时,出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java

学习查错--关于在eclipse编写JSP文件时,出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java
学习查错--关于在eclipse编写JSP文件时,出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java

学习查错--关于在eclipse编写JSP文件时,出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java