The following tools are used in this tutorial. Note that Netbeans 8 and Tomcat 8 require Java7:
- Netbeans IDE for Java EE Developers
- Tomcat 8.x Web Server
- ICEfaces downloads Download ICEfaces 4.0.0
You will want to group create your Netbeans ICEfaces libraries based on your project requirements. This tutorial has grouped the icefaces.jar with the icefaces-ace.jar, and left icefaces-mobi.jar and icepush.jar in their own defined library. If you know you are going to want the mobile components without ace, then you would include the icefaces.jar with the icefaces-mobi.jar. If you are unsure, then you may want to have separate libraries for each of the 4 jars. Both icefaces-mobi.jar and icefaces-ace.jar require icefaces.jar.
Start up Netbeans, then choose Tools and then Libraries:-
Step 1 Simply start up Netbeans and then create a Maven -> Web Project
Unable to render embedded object: File (createMavenWebProject.png) not found.
Unable to render embedded object: File (createMavenWebProject2.png) not found.
Unable to render embedded object: File (createMavenWebProject3.png) not found.
Step 2 Add JSF Framework
Unable to render embedded object: File (addFrameworkJSF.png) not found.
Check the release notes of the particular ICEfaces bundle you have downloaded to determine which versions are supported. Reviewing ICEfaces-4.0.0-RC1 release notes indicates Mojarra 2.2.7 is supported, so that would be the version we will include in this project.
Here is the link to the release notes page, to be used for 4.0.0 and any future releases.
Unable to render embedded object: File (addFrameworkJSF2.2.png) not found.
Step 3 Add ICEfaces
Unable to render embedded object: File (addICEfaces.png) not found.
Step 4 Modify Pom.xml for correct version of ICEfaces.
Note that Netbeans incorrectly adds ICEfaces-3.1.0 which is an open source version of ICEfaces for JSF 2.1 (not 2.2). In order to work with JSF 2.2, then you need a minimum of ICEFaces-4.0.0-RC1. Open pom.xml in the project folder and then highlight the version of ICEfaces. Netbeans (assuming you have internet) will then let you know which versions are available from the existing maven repositories registered to it. This tutorial is being written a few days before 4.0.0.GA is released, so the latest version currently available is 4.0.0-RC1. We will select it (for now). Ensure all the ICEfaces jars you are using for this project are the same version!
Unable to render embedded object: File (modifyPom.png) not found.
Step 5. Remove any reference to compat components (ice namespace). Open welcomeIcefaces.xhtml and remove the highlighted (some are commented out) lines as the following image:-
Step 6. Run it!
Click on the 'ICEfaces Welcome Page' link to view the welcomeToIcefaces.jsf page