File Encounter The Error/Warning

本文针对使用Eclipse进行HTML5页面调试时出现的常见问题提供了解决方案,包括标签属性错误、标签规范及JDK版本不匹配等问题,并给出具体的修正步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.

Multiple annotations found at this line:
- Undefined attribute name 
(placeholder).
- Undefined attribute name 
(placeholder). 

当页面调试达不到预期的效果,而eclipse又出现了如上所示的提示,那么就应该考虑,你使用的标签属性是不是html5中的。

或许换个浏览器再试试,就会有效果了。

不过目前eclipse中的警告还是不会消除


2.

“Tag (link) should be an empty-element tag.”

多半是<html xmlns="http://www.w3.org/1999/xhtml">  中的xhtml的严格要求所致,所以一定要规范file的书写。

eg:有些标签是需要加“/”

详细实例


3.

源代码:<form action="<%=request.getContextPath() %>/hr?action=login" method="post">
错误出现在   .getContextPath() 

Multiple annotations found at this line:
- The method getContextPath() from the type HttpServletRequest refers to the 
missing type String
- Invalid location of tag (form).

记得前几天更新了JDK,所以操作如下:

右击项目——Build Path——Configure Build Path..——Libraries——右侧“Add Library”——JRE System Library——Workspace Default JRE


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值