Editing facelets in eclipse 3.3 WTP 2.0

If you’re all set up to do Java Server Faces, but you want to be able to edit the jsf-config.xml using the WTP 2.0 (web tools platform) and have some kind of editing support in eclipse, try this:

Go to Window > Preferences … > General > Content Types > Text > JSP and add “*.xhtml”, or whatever extension you’re using for your facelets.

Now you’ll gain a bit of validation and editing support that wasn’t there before. Hope that helps!


4 Responses to Editing facelets in eclipse 3.3 WTP 2.0

  1. Felix says:

    Thanks for your advice with xhtml! I still can’t get auto completion to work with this header. Do you have any suggestions?

    Thanks in advance!


  2. dobes says:

    Hi Felix,

    I’ve given some thought about how I might trick the JSP editor into giving me completions, but so far I haven’t come up with anything. I think we’ll have to wait for real facelets support to be added to WTP.

  3. dobes says:

    Although, take a look at this:


    Basically, you’ll have to create a TLD file for all your facelets libraries; once you do, eclipse will do completion on tags. I don’t think that’ll help you get completion for EL expressions, though. I also don’t know how to create a TLD file.

  4. pm says:

    You can have a detailed solution for that autocompletion problem and content assist at blog.javarnd.com/?p=11.

%d bloggers like this: