Eclipse创建jsp后报错Multiple annotations found at this line:- The superclass “javax.servlet.http.HttpServlet” was not found on the JavaBuild Path- The superclass “javax.servlet.http.HttpServlet” was not found on the JavaBuild Path
这里写图片描述

是因为缺少servlet-api.jar右击项目文件,选择Build Path–>Configure Build Path…–>Libraries如果没有Apache Tomcat,就点击Add Library–>Server Runtime–>Next–>选择Apache–>Finish,刷新项目看看错误是否消失。
如果有Apache Tomcat就点击Add Library…–>Server Runtime–>Next–>点击Apache tomcat->Finish–>ok,

本文介绍了解决在Eclipse中创建JSP页面时出现的错误“Multiple annotations found at this line”,主要原因是缺少servlet-api.jar。通过正确配置项目构建路径,添加Apache Tomcat的Server Runtime库,可以有效解决此问题。
331

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



