我的 xhtml 网站很少,使用 PrimeFaces 的网站会打印此错误:一个或多个资源的目标是“头”
这是我的模板文件:
<html lang="pl"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-type" />
<link href="resources/css/bootstrap.css" rel="stylesheet"/>
<link href="resources/css/font-awesome.css" rel="stylesheet"/>
<link rel="stylesheet" type="text/css" href="resources/css/style.css"/>
<link rel="stylesheet" type="text/css" href="resources/css/style-mobile.css"/>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="resources/js/bootstrap.js"></script>
</h:head>
<h:body>
<ui:insert name="header">
<ui:include src="/global/top-menu.xhtml"/>
</ui:insert>
<ui:insert name="content">
<ui:include src="/index.xhtml"/>
</ui:insert>
<ui:insert name="footer">
<ui:include src="/global/footer.xhtml"/>
</ui:insert>
</h:body>
</html>
这是打印错误的内容:
<!DOCTYPE html>
<html lang="pl"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
</h:head>
<h:body>
<ui:composition template="/WEB-INF/template/mainLayout.xhtml">
<ui:define name="content">
<h:outputScript library="js" name="calendar-pl.js"/>
<h:outputScript library="js" name="registration.js"/>
<div class="container registration-container">
//some PrimeFaces stuff which works properly by the way
</div>
</ui:define>
</ui:composition>
</h:body>
</html>