JSF 2.0 Source Code Comment

Commenting in JSF 2.0 looks just like commenting in HTML, so you need to write something like this: <!-- this is the comment -->. By default, Facelets xml parser will include your comment in a generated HTML file, so for a file like the one below:


Facelets xml parser would generate the following output:


If you don't want to include comments in a generated HTML file, you need to add the following context-param node to your web.xml file:


With javax.faces.FACELETS_SKIP_COMMENTS, the generated file looks like that:

1 comments :: JSF 2.0 Source Code Comment

  1. I've just realized that SyntaxHighlighter (I belive by Alex Gorbatchev) is not working on iOS (Safari). At least for mobile version of this site (this is blogger.com blog).

    You won't see any source code on this page (like XML, java or other samples).

    Sorry for technical problems. I will stop using this tool.

    Best Regards,
    Michael Flowersky

Post a Comment