gpt4 book ai didi

java - 无法在复合组件中使用 div 标签

转载 作者:行者123 更新时间:2023-11-29 03:57:30 25 4
gpt4 key购买 nike

我编写了以下代码并将其另存为一个单独的文件。

<!DOCTYPE html>
<ui:composition
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<div id="crb_header">
<br/>
<h4 align="right">Welcome : #{homebean.user}</h4>
<br/>
</div>
</ui:composition>

以上页面使用 ui:include 附加到主页,并且在主页末尾可以看到以下警告消息。

Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix h4 but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix br but no taglibrary exists for that namespace.
Warning: This page calls for XML namespace declared with prefix br but no taglibrary exists for that namespace.

我们不能在这个 ui:composition 文件中使用 html 标签吗?

最佳答案

您是否没有在 ui:composition 中包含 xhtml 命名空间?

<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">

关于java - 无法在复合组件中使用 div 标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5481894/

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