views:

87

answers:

1

Hi,

is it possible to embed comments in my .xhtml-files that are only displayed in the source and not the rendered result? I want to include author, date,... in the files but they should not be visible to the enduser in the generated output. If I use the standard comment-tags <!-- --> the browser displays them.

+3  A: 

Add the following into your web.xml:

<context-param>
    <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
    <param-value>true</param-value>
</context-param>

This way Facelets will skip the comments while parsing the view xhtml template.

Petar Minchev
it's deprecated.Use javax.faces.FACELETS_SKIP_COMMENTSinstead!He is using JSF2.0!!
Odelya
@Odelya Thanks for the info:)
Petar Minchev