There are a lot of tips and hints out there on the internet, which describe how you could add support for Java Server Faces and Facelets to the Eclipse environment.
Mostly, they deal with adding code completion for JSF/Facelets tags and so on. There are some possibilities to achieve this, ranging from creating TLD files to using the JSP editor in Eclipse for the XHTML code of the Facelets pages.

But the “trick” I prefer is much more simple :D

You want to see it? Well, just download and install the JBoss Tools and you have it all!

Usually, when you enter standard <!-- ... --> html comments in your XHTML definition for a Facelets view, these comments are rendered by Facelets, so they are included in the resulting HTML. Even EL contained in these comments is executed!

In most cases, this is not what you hope to see, because if you want to make real comments, you have to use the <ui:remove> tag, which is not really comfortable.

Read more…