一、eclispe的jsp 首行报错错误原因为缺乏运行环境(推荐方法1)
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Button..................
或者
Multiple annotations found at this line:
- 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
- The superclass "javax.servlet.http.HttpServlet" was not found on the Java
Build Path
1,bulid pase 里面缺乏导入RunTime:导入Library ->server runtime,并在Order and Export中选择tomcat(需要eclipse配置tomcat)。
2,在WEB-INF目录-->新建lib-->选择tomcat安装目录里面的lib里面jar包,全部复制--->复制到lib里面

本文介绍了Eclipse环境下遇到的JSP首行报错问题及其解决方法,主要原因是缺少必要的运行环境配置。文章提供了两种推荐解决方案:一是通过构建路径添加服务器运行时环境;二是将Tomcat的库文件复制到项目的WEB-INF/lib目录下。
3897

被折叠的 条评论
为什么被折叠?



