Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSF display HTML comment

Tags:

html

jsf

jsf-2

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.

like image 752
Gaim Avatar asked Nov 21 '10 16:11

Gaim


People also ask

How do you comment out in xhtml?

Comments are placed inside <! -- --> in XHTML MP. This is the same as HTML and WML 1.


1 Answers

This is crude but it does work (under JSF 1.2 anyway not tested in 2)

<h:outputText value="&lt;!--" escape="false" /> My comment <h:outputText value="--&gt;" escape="false" />
like image 117
reevesy Avatar answered Sep 28 '22 03:09

reevesy