java新工程导入eclipse常见问题---Multiple annotations found at this line

1.jsp里会显示红色波浪线
报错信息是:Multiple annotations found at this line:
- java.io.IOException cannot be resolved to a type
- String cannot be resolved to a type
- java.io.IOException cannot be resolved to a type
- String cannot be resolved to a type
- The type java.util.Map cannot be resolved. It is indirectly referenced from
required .class files
- The method getScheme() from the type ServletRequest refers to the missing type
String
- The type java.util.Map cannot be resolved. It is indirectly referenced from
required .class files
2.在jsp页面里包含的java代码报错
报错信息:Multiple annotations found at this line:
- The method getContextPath() from the type HttpServletRequest refers to the
missing type String
- The method getContextPath() from the type HttpServletRequest refers to the
missing type String
3.解决方案
①.右键工程->Build Path -> Configure Build Path , 在 Libraries 选项下,会发现有个出错的jre Libraries,将其Remove掉。
这里写图片描述
②.然后右击该项目 - Build Path - Add Library, 选择JRE System Library,选择添加的版本,之后一路ok即可。
这里写图片描述
4.小插曲:我的eclipse里面开始没有找到build path,很是头大,后来自己多次尝试,有两种方法可以找到
①.在右上角有各种模式可以选择,选择java之后,右键该项目就有build path选项了,之后操作同上。
②.在javaEE模式下也可以使用build path,截图不是javaEE模式(别误会)
截图不是javaEE模式(别误会)
右键JRE就可以看到build path选项,其他操作同上
右键JRE就可以看到build path选项,其他操作同上

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值