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