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:
web.xml
javax.faces.FACELETS_SKIP_COMMENTS true
or when you're still on JSF 1.2 which doesn't use Facelets as default view technology yet:
facelets.SKIP_COMMENTS true
To remove specific comments only, use .