jsf 2.0中的隐藏注释? [英] Invisible comments in jsf 2.0?
本文介绍了jsf 2.0中的隐藏注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在我的.xhtml文件中嵌入只显示在源而不是渲染结果中的注释?
我想在文件中包括author,date,...,但是它们不应该在生成的输出中对最终用户可见。如果我使用标准的注释标签<! - - >
浏览器显示它们。
is it possible to embed comments in my .xhtml-files that are only displayed in the source and not the rendered result?
I want to include author, date,... in the files but they should not be visible to the enduser in the generated output. If I use the standard comment-tags <!-- -->
the browser displays them.
推荐答案
将以下内容添加到 web.xml
中:
<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
这样 Facelets
将跳过注释解析视图 xhtml
模板。
This way Facelets
will skip the comments while parsing the view xhtml
template.
这篇关于jsf 2.0中的隐藏注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文