该页面要求使用前缀br声明的XML名称空间,但不存在标记库 [英] This page calls for XML namespace declared with prefix br but no taglibrary exists

查看:109
本文介绍了该页面要求使用前缀br声明的XML名称空间,但不存在标记库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚完成了Netbeans Hibernate入门教程( http://netbeans.org/kb/docs/web/hibernate-webapp.html#01 ),出现以下错误: 此页面要求使用前缀br声明但没有标记库的XML名称空间"

I just finished the Netbeans introduction to Hibernate tutorial ( http://netbeans.org/kb/docs/web/hibernate-webapp.html#01 ) and I am getting the following error: "This page calls for XML namespace declared with prefix br but no taglibrary exists"

现在,我在其他地方也看到了类似的问题: http://forums.sun.com/thread.jspa?threadID=5430327 但答案未在此处列出.或者,如果是这样,那么我显然会丢失它-index.xhtml文件的第一行显示为" http://www.w3.org/1999/xhtml ".它也没有解释为什么当我重新加载localhost:8080时消息消失.

Now, I have seen a similar question somewhere else: http://forums.sun.com/thread.jspa?threadID=5430327 but the answer is not listed there. Or, if it is, then I am clearly missing it -- line one of my index.xhtml file reads "http://www.w3.org/1999/xhtml". It also does not explain why, when I reload localhost:8080, the message disappears.

这是我的index.xhtml文件:

Here is my index.xhtml file:

<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标记.

The problem clearly comes from the <br/> tag, and facelets is trying to interpret it as a JSF/facelets tag with a prefix.

如果遵循标准,则此标记应类似于此<br />(斜杠前有一个空格).尝试这种方法,如果它不起作用,请尝试将其删除.

If we follow the standards, this tag should look like this <br /> (with a space before the slash). Try it that way, and if it doesn't work, try removing it.

这篇关于该页面要求使用前缀br声明的XML名称空间,但不存在标记库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆