I am us开发者_运维问答ing Eclipse 3.5
In order to use web - I downlaoded web tools. However, I can't edit facelet file (xhtml)! It opens it as txt file and doesn't complete the tags.
Is there a place that I have to configure it in Eclipse?
Eclipse 3.5's WTP does not support Facelets out of the box. You need to use Eclipse 3.6. Also don't download WTP separately, but download the version of Eclipse that already has it integrated. You need "Eclipse IDE for Java EE Developers" from http://www.eclipse.org/downloads/
If you have to use Eclipse 3.5, you can install the "richfaces" editor from JBoss Tools (see http://www.jboss.org/tools). Granted, the name is completely awkward, but it's actually a general JSF/Facelets editor that works better than the one bundled with Eclipse 3.6.
You can install and use this without having anything to do with JBoss AS. The only downside of the Facelets editor from JBoss tools is that it depends on the dreaded XULRunner, which might not be available for your platform (32 bits is usually okay, but 64 bits only works on Linux).
Try Window > Preferences > Editors > File Associations
to find the xhtml filetype and associate it with Web Page Editor or HTML Editor
精彩评论