[英]JSF template not working
请检查这些Eclipse项目层次结构,并告诉我出了什么问题,为什么当我运行放在/Home.xhtml
的主页时,在/WEB-INF/template/
定义的/WEB-INF/template/
没有出现? 当我运行Home.xhtml时,唯一出现的是没有任何模板的文本“主要内容区域”!
谢谢。
Template.xhtml
Home.xhtml
尝试将其放在webcontent上...不在WEB-INF内。
这是我的方法:
<p:layoutUnit position="center" style="border: 0;margin: 0px auto; padding: 0; height: 100%;">
<ui:insert name="content">
<ui:include src="content.xhtml"/>
</ui:insert>
</p:layoutUnit>
和content.xhtml:
<body>
<ui:composition>
</ui:composition>
</body>
和客户:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:po="http://java.sun.com/jsf/composite/componentes"
template="/templates/template.xhtml">
<ui:define name="content">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.