我在我的页面中包含了 header.html(不是 .xhtml),但是当我预览我的页面时,它给了我错误“XML Parsing Error: no element found”。我知道这是标签没有正确关闭的问题,但是由于我的标题页是 html 文件,而不是 xhtml 文件,它不应该关闭标签,对吗?
如果我确实关闭了 header.html 中的所有元标记,我的页面工作正常,但我想知道如果我将它们包含在 jsf2 中,是否必须正确关闭 html 文件中的所有标记,谢谢。
header.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Header</title>
<meta name="description" content="">
</head>
<body>header content</body>
</html>
欢迎1.xhtml
<ui:include src="header.html" />
<p>welcome page</p>