jsp头文件提示:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Bu

时间:2022-04-28 13:43:50

今天用Eclipse创建jsp文件的时候,提示:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Bu

上网百度了一下:报错原因是:web工程缺少编译Tomcat运行时相关类,只要加上就行了。

找到出错的那个项目,右键选择 BulidPath,然后点击ConfigureBuildPath,选择Libraries,然后点击Add Library,选择ServerRuntime

就可以了。

如下:

jsp头文件提示:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Bu