Templates 未应用JSF模板
我创建了驻留在应用程序根上下文中的模板(template.xhtml)。 我想将其应用于位于“public”文件夹中的页面(newTemplateClient.xhtml)。 因此newTemplateClient.xhtml如下所示:Templates 未应用JSF模板,templates,jsf,Templates,Jsf,我创建了驻留在应用程序根上下文中的模板(template.xhtml)。 我想将其应用于位于“public”文件夹中的页面(newTemplateClient.xhtml)。 因此newTemplateClient.xhtml如下所示: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns="http://www.w3.org/1999/xhtml"
template="./../template.xhtml">
.
.
.
好的,问题解决了。
解决方案是使用:
<h:outputStylesheet name"css/default.css"/>
<h:outputStylesheet name"css/cssLayout.css"/>
相反:
<link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
<link href="./resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
<h:outputStylesheet name"css/default.css"/>
<h:outputStylesheet name"css/cssLayout.css"/>
<link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
<link href="./resources/css/cssLayout.css" rel="stylesheet" type="text/css" />