Alex Rivera | Logout

JSF display HTML comment

Asked 2010-11-21T16:01:18.870
11

I am using JSF 2.0 and have defined property javax.faces.FACELETS_SKIP_COMMENTS to skip comments in JSF code because there is a lot of other code, deveploping comments etc. But I need to print some HTML comments into client's browser eg. for defining alternative conditioned stylesheet for other browsers.

Please is there any way how to do it? Because all my attempts failed.

Edit
Report

1 Answer

1

Based on @Juan's and @reevesy's ideas is this one:

<f:verbatim>&lt;!--
    This is a happy HTML comment :)
--&gt;</f:verbatim>

Which will render:

<!--
    This is a happy HTML comment :)
-->
answered 2011-10-24T12:02:00.760

Your Answer