While this seems like a trivial task the problem is when you are using JSF it escapes comments which makes conditionals unusable. If you were to include the line above and render within JSF facelets the encoded output looks like:
One way to fix this is to use JSF the
outputText and set escape attribute to false. I started off running the entire snippet above through an online escape tool and then pasting it into the JSF code. The final output looks like:
You can also use OmniFaces
to solve for the issue too, you can see more by viewing the conditionaComment component.
Unfortunately neither way supports natural front end development and requires an ugly workaround to make something so simple work.