【发布时间】:2011-07-25 19:27:47
【问题描述】:
我编写了以下代码并将其保存为单独的文件。
<!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 标签吗?
【问题讨论】:
-
请注意,它一直有效,而且这些只是 XML 解析器警告,没有错误。当 JSF 项目阶段未设置为
Development时,它们不会出现。它们也不会与某些 XML 解析器(阅读:某些应用服务器)一起出现。
标签: java netbeans jsf-2 facelets