gpt4 book ai didi

jsf - 此页面调用以前缀 br 声明的 XML namespace ,但不存在标签库

转载 作者:行者123 更新时间:2023-12-01 10:14:32 25 4
gpt4 key购买 nike

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

现在,我在其他地方看到了类似的问题: 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/>标记,facelets 试图将其解释为带有前缀的 JSF/facelets 标记。

如果我们按照标准,这个标签应该是这样的 <br /> (斜线前有一个空格)。以这种方式尝试,如果它不起作用,请尝试将其删除。

关于jsf - 此页面调用以前缀 br 声明的 XML namespace ,但不存在标签库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2561956/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com