views:

804

answers:

1

I am running Eclipse 3.5 and JBoss 5.1. I want to create a JSF 2.0 project.

I heard here that the Eclipse JBoss Tools plugin version 3.1 (available here) could do this for me.

I have installed the plugin. However, if I go to the Project Facets properties page for a Dynamic Web Project, I only see Facets for JavaServer Faces 1.1 and 1.2. My Java facet is set at 6.0, and my Dynamic Web Module to 2.5.

In the Targeted Runtimes properties page, I see that I am targeting the JBoss 5.1 Runtime.

I understand that Eclipse Helios will be here next week, but I'm curious if its possible to get JSF 2.0 working with 3.5. Any thoughts?

+1  A: 

Certainly you can. Just set to 1.2, give the JSF 2.0 libraries and it will work. It's after all just the code which you write. You'll maybe only miss the IDE assistance in JSF 2.0 specific features, but this doesn't harm if you know how to write code yourself. Heck, you can even do this all using plain notepad.exe and javac.exe ;)

See also:

BalusC
First thing I tried: yet if I go to the Java Server Faces properties page (under the Project Facets properties page) for the project and try to switch the JSF library from the default Provided by the Target Runtime (1.2) to a User Library I have created which contains JSF 2.0, I get "Incorrect Library version: The selected library version (2.0) does not match the facet version (1.2).
Tom Tresansky
Choose "server provided libraries" and then if necessary put in `/WEB-INF/lib` yourself (if the server after all doesn't provide it, e.g. you're using Tomcat instead of Glassfish). As said, the whole IDE and toolsets are not *required* to be able to develop JSF. It just *eases* the development ;) It's only a different learning curve.
BalusC
Awesome! Thanks for the follow up!
Tom Tresansky
Just for the record, this is the whole of JSF including the latest EL?
Thorbjørn Ravn Andersen
@Thor: EL is servletcontainer specific. By the way, Eclipse Helios which came out July 24 officially supports JSF 2.0.
BalusC
You cannot do method invocation with parameters unless EL is new enough. But you say that is irrelevant to JSF 2.0?
Thorbjørn Ravn Andersen
@Thor: EL is to be provided by servletcontainer. It is not included in JSF. If servletcontainer offers [EL 2.2](http://download.oracle.com/javaee/6/tutorial/doc/bnahu.html#gjhbz), you'll be able to invoke methods with arguments. You can however provide a newer/different EL implementation yourself in `/WEB-INF/lib` and `web.xml`. A popular one for your requirement is JBoss EL.
BalusC