jsf – 此页面调用以前缀br声明的XML名称空间,但不存在taglibrary

我刚刚完成了Netbeans对Hibernate教程( http://netbeans.org/kb/docs/web/hibernate-webapp.html#01)的介绍,我收到以下错误
“此页面调用使用前缀br声明的XML名称空间,但不存在taglibrary”

现在,我在其他地方看到过类似的问题:
http://forums.sun.com/thread.jspa?threadID=5430327
但答案没有列在那里.或者,如果是,那么我显然错过了它 – 我的index.xhtml文件中的第一行读取“http://www.w3.org/1999/xhtml”.它也没有解释为什么当我重新加载localhost:8080时,消息消失了.

这是我的index.xhtml文件

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition template="./template.xhtml">
        <ui:define name="body">
            <h:form>
                <h:commandLink action="#{filmController.prevIoUs}" value="PrevIoUs #{filmController.pageSize}" rendered="#{filmController.hasPrevIoUsPage}"/>
                <h:commandLink action="#{filmController.next}" value="Next #{filmController.pageSize}" rendered="#{filmController.hasNextPage}"/>
                <h:dataTable value="#{filmController.filmTitles}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Title"/>
                        </f:facet>
                        <h:outputText value="#{item.title}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Description"/>
                        </f:facet>
                        <h:outputText value="#{item.description}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value=" "/>
                        </f:facet>
                        <h:commandLink action="#{filmController.prepareView}" value="View"/>
                    </h:column>
                </h:dataTable>
                <br/>
                </h:form>
            </ui:define>
        </ui:composition>
    </html>

解决方法

问题显然来自< br /> tag和facelets试图将其解释为带有前缀的JSF / facelets标记.

如果我们遵循标准,此标记应如下所示< br /> (在斜线前有一个空格).尝试这种方式,如果它不起作用,请尝试删除它.

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念