JBoss Eclipse - How to create a JSF 2.0 application
- Published: 07 December 2010
Eclipse is the most used software development environment. Lots of specific plugins are available for JBoss products, however also with the minimal Eclipse Enterprise set you can easily build Java EE 6 applications.
In this tutorial we will show how to configure and create a JSF 2.0 application on JBoss AS 6 using Eclipse 3.6.0 IDE (Helios) in a matter of minutes.
JBoss Eclipse - building a JSF 2.0 application with JBoss 6.
In order to run this example you need to download a copy of Eclipse Java Enterprise edition from http://www.eclipse.org
A JSF application can be created from a Dynamic Web Project. Reach the Menu: New | Other | Web | Dynamic Web Project
Select the Target runtime pointing to your JBoss 6 installation (JBoss 6 is not included in the server list, however by choosing JBoss 5 will work as well). Now click on the "Modify" button, near the Configuration option.
In the next screen you have to enable the JSF 2.0 facet so that Eclipse will add JSF configuration file and will enable JSF facilities (code completion in JSF pages).
If you have got an earlier version of Eclipse you will find just Java Server Faces 1.1 available. That's not a big issue- the only thing you have to change is the faces-config.xml heading which needs to specify you are using JSF 2.0
Accept the next screen settings. Finally in the JSF Capabilities window you have to point out where JSF libraries are located. Choose the "Manage Library" button and create a New User Library containing JSF 2.0 libs.
- Next >>