出现的两个问题:
在我没进行任何修改之前出现的问题,在jsp页面上的报错:我在类路径下添加了tomcat之后,在jsp页面上的报错: 原因:解决方法:
解决类路径下没有tomcat的问题解决配置jre环境的问题
在添加Tomcat后仍报错是因为没有配置jre环境 至此报错全部消除:
出现的两个问题: 在我没进行任何修改之前出现的问题,在jsp页面上的报错:我在类路径下添加了tomcat之后,在jsp页面上的报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
Multiple annotations found at this line: - The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path - Line breakpoint:success.jsp [line: 1]
原因:
这是因为没有添加tomcat和没有配置jre环境的问题
解决方法: 解决类路径下没有tomcat的问题
- 工具栏点Windows - preferencesServer - Runtime Environment - Add
输入tomcat,找到自己安装的tomcat版本
选择tomcat所在的文件夹
右键项目,点击properties,按图片进行点击
选择server runtime
点击你的tomcat
报错为:
Multiple annotations found at this line:
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java
Build Path
- Line breakpoint:success.jsp [line: 1]
- 右键项目,点击properties,按图片进行点击
按图片的样子选中



