https://stackoverflow.com/a/3869174/9195115
,这是可能的。然而,对于HTML5doctype,Eclipse不会显示任何未关闭标记的警告,例如
link
meta
.
例如,在下面的facelet中,我希望Eclipse显示一个警告/错误,因为尽管它是有效的HTML5,但它不是有效的XML,这会导致
javax.servlet.ServletException: Error Parsing /new.xhtml: Error Traced[line: 7] The element type "link" must be terminated by the matching end-tag "</link>".
<!DOCTYPE html>
<html xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>New page</title>
<link href="style.css"><!-- Warning here -->
</h:head>
<body>
<footer>Footer</footer>
</body>
</html>
我已经花了很多时间在Eclipse首选项中,试图找到一个选项来实现这一点。是否有任何选项可以打开我错过的警告,或者有任何插件可以这样做?