Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 需要有关JSF和<;的帮助;用户界面:插入>&书信电报;用户界面:定义>;_Java_Html_Jsf - Fatal编程技术网

Java 需要有关JSF和<;的帮助;用户界面:插入>&书信电报;用户界面:定义>;

Java 需要有关JSF和<;的帮助;用户界面:插入>&书信电报;用户界面:定义>;,java,html,jsf,Java,Html,Jsf,我对这个简单的代码有问题,我不能正确地查看“footer.xhtml”内容(“woooks”一词) web.xml piloto_18 layout.xhtml Facesservlet javax.faces.webapp.FacesServlet 1 Facesservlet *.xhtml 您应该使用ui:include in layout.xhtml来包含footer.xhtml layout.xhtml <ui:composition xmlns="http://www.w3

我对这个简单的代码有问题,我不能正确地查看“footer.xhtml”内容(“woooks”一词)

web.xml


piloto_18
layout.xhtml
Facesservlet
javax.faces.webapp.FacesServlet
1
Facesservlet
*.xhtml

您应该使用ui:include in layout.xhtml来包含footer.xhtml

layout.xhtml

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      template="layout.xhtml">

     <p> working!!! </p>
</ui:composition>


Facelets模板

footer.xhtml

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      template="layout.xhtml">

     <p> working!!! </p>
</ui:composition>

工作


是否试图在layout.xhtml中包含footer.xhtml?否@SalihErikci。我尝试在layout.xhtml中嵌入footer.xhtml以显示“正在工作”。现在我意识到了我的错误。这是一种误解