TOTD #54: Java Server Faces with Eclipse IDE


Ed pointed me to this excellent tutorial that explains how JavaServer Faces applications can be easily created using Eclipse IDE. The article clearly shows all the steps to create a Java Server Faces application and demonstrates the following JSF concepts:
  • How to register managed beans to a JSF application ?
  • Different templates for creating JSF pages
  • Validators
  • Resource Bundles
  • Navigation rules in faces-config.xml (very intuitive and easy-to-use)
  • Dependency injection
  • Value and Method Binding
Few code/snapshot mismatches but knowing that it's only version 0.3, it's a damn good job!

Couple of differences from the article:

First, I deployed all the samples on GlassFish v3 Prelude which has Mojarra 1.2 baked in. The screencast #28 explains how to configure GlassFish with Eclipse IDE.

Secondly, instead of using WTP, I used Eclipse 3.4 for Java EE developers which has built-in support for JSF 1.1 and 1.2 applications. So there is no need to download/configure JSP/JSTL libraries. Instead the libraries are specified during project creation as shown below:



And then let the server side provide JSF implementation by selecting radio button as shown below:



That's it, now the Mojarra baked in GlassFish v3 Prelude is used for JSF runtime.

The faces-config editor is really cool, intuitive and easy-to-use. Here is a snapshot:



Here is a snapshot of the project explorer window (package names are different from the original article):



And now finally the outputs from 4 JSF applications:












All of this using Mojarra and GlassFish v3 Prelude :)

Let us know your feedback on Mojarra at GlassFish Webtier forum, file bugs in Issue Tracker, and find the latest information about Mojarra at javaserverfaces.dev.java.net.

Technorati: totd javaserverfaces eclipse glassfish v3 mojarra
Comments:

Thank you for this positive feedback to my tutorial. I hope the article helps others. Cheers, Lars

Posted by Lars Vogel on November 21, 2008 at 05:47 AM PST #

As more information is required..

Posted by sinema izle on March 07, 2009 at 07:26 AM PST #

Post a Comment:
Comments are closed for this entry.
About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today