views:

1614

answers:

4

I have the WTP 3.1 plugin installed and have also installed the Glassfish v3 plugin. I am able to register my server.

When I create a dynamic web project, I can see that the maximum dynamic web module version available is 2.5. I then choose the default configuration for Glassfish v3 but, when I look at it JSF, it is not selected by default. When I select it, the maximum version available is 1.2.

I want to use JSF with facelets - does Eclipse support this? I can't seem to find anything helpful on the Eclipse WTP site.

+3  A: 

Java EE 6 / JSF 2.0 is relatively new. Most tools are already ready, but Eclipse has to catch up it yet.

The status as far:

  • IntelliJ Ultimate Edition was early in this. Unfortunately not freeware. Note: the free Community Edition doesn't provide tools for much of Java EE, let alone JSF.

  • Netbeans 6.8 came a bit later almost full Java EE 6 support, including JSF 2.0.

  • Eclipse for Java EE planned to support Facelets in Galileo, but it was cancelled and postponed to the successor Helios which is currently in one of its latest Release Candidate stages been released at 24 July 2010. Helios for Java EE will ship with full fledged Java EE 6 support, including JSF 2.0.

As of now, it just works fine in Eclipse Ganymede/Galileo when you select JSF 1.2 and uses JSF 2.0 libraries. You'll only miss some code assistance which may be useful for JSF 2.0, but you can write code as good yourself.

BalusC
To be precise, NetBeans 6.8 doesn't provide CDI support so it doesn't "fully" support Java EE 6. But NB 6.9 does. NB 6.9 also introduces *Code completion for JSF tag attribute values*. See the [Java EE](http://wiki.netbeans.org/NewAndNoteworthy69#Java_EE) section in the release notes. +1 anyway.
Pascal Thivent
Fixed, thanks. The release notes by the way also say that it's available as [patch](http://wiki.netbeans.org/NetBeans6.8PatchesInfo) for 6.8 as well.
BalusC
So it looks like Net Beans is probably the best way to go now. I am currently using Net Beans 6.8 - in general is ok but seems a bit buggy when used for JSF 2.0 development - sometimes you need to restart the IDE for some random reason. Am using it on windows though, maybe it would be better on linux.
Shane
A: 

Have a read on http://weblogs.java.net/blog/2009/05/18/using-ide-write-jsf-20-app

It describe in details on how to setup your eclipse for jsf 2.0 development.

imnd
+1  A: 

Use Eclipse with JBoss Tools Plugin. It has support for JSF2 and CDI.

http://in.relation.to/14750.lace

kpolice
A: 

Note, that you can do JSF 2.0 development in Eclipse, but not with as much tool support as might come later.

You can always edit xhtml files directly as XML-files (and have the namespaces registered), and have Glassfish deployments. I've done that, with stock Eclipse 3.5.2 JEE edition, and the Glassfish plugin.

Thorbjørn Ravn Andersen