本文介绍了如何删除我的Facelets中的HTML注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 我希望在向最终用户发送之前,从我的facelets中删除所有HTML注释。是否有任何标准方法?解决方案实际有两种方法: 要删除所有评论,请将其添加到 web.xml : < context-param> < param-name> javax.faces.FACELETS_SKIP_COMMENTS< / param-name> < param-value> true< / param-value> < / context-param> 或者当你还在使用JSF 1.2时,不使用Facelets作为默认视图技术: < context-param& < param-name> facelets.SKIP_COMMENTS< / param-name> < param-value> true< / param-value> < / context-param> 要仅删除特定评论,请使用 < ui:remove> 。 < ui:remove><! - HTML评论。 - >< / ui:remove> I would like to remove all HTML comments from my facelets before delivering to end users. Does any standard approach exist? 解决方案 There are actually two ways:To remove ALL comments, add this to web.xml:<context-param> <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name> <param-value>true</param-value></context-param>or when you're still on JSF 1.2 which doesn't use Facelets as default view technology yet:<context-param> <param-name>facelets.SKIP_COMMENTS</param-name> <param-value>true</param-value></context-param>To remove specific comments only, use <ui:remove>.<ui:remove><!-- This is a HTML comment. --></ui:remove> 这篇关于如何删除我的Facelets中的HTML注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-07 01:31