我想在我的项目中引入 CC。我在 JBoss 7.1.1 上运行 Java EE 6。
/myProj/src/main/webapp/composites/scheda.xhtml:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
<composite:attribute name="prod" />
</composite:interface>
<composite:implementation>
Hello!
</composite:implementation>
</html>
/myProj/src/main/webapp/someDir/page.xhtml:
<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:composites="http://java.sun.com/jsf/composite/composites"
template="/templates/default.xhtml">
<ui:define name="content">
<p:dialog
header="Scheda"
widgetVar="schedaDialog"
id="schedaDialogId">
<composites:scheda prod="test" />
</p:dialog>
</ui:define>
</ui:composition>
这导致:
javax.servlet.ServletException: /.../page.xhtml 标记库支持命名空间:http: //java.sun.com/jsf/composite/composites,但没有为名称定义标记:scheda
一些错误?