Miles to go …

November 20, 2008

TOTD #54: Java Server Faces with Eclipse IDE

Filed under: web2.0 — arungupta @ 5:00 am

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

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot
Related posts:
  1. TOTD #51: Embedding Google Maps in Java Server Faces using GMaps4JSF
  2. TOTD #46: Facelets with Java Server Faces 1.2
  3. TOTD #94: A simple Java Server Faces 2.0 + JPA 2.0 application – Getting Started with Java EE 6 using NetBeans 6.8 M1 & GlassFish v3
  4. TOTD #95: EJB 3.1 + Java Server Faces 2.0 + JPA 2.0 web application – Getting Started with Java EE 6 using NetBeans 6.8 M1 & GlassFish v3
  5. TOTD #45: Ajaxifying Java Server Faces using JSF Extensions

2 Comments »

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

    Comment by Lars Vogel — November 21, 2008 @ 1:47 pm

  2. As more information is required..

    Comment by sinema izle — March 7, 2009 @ 3:26 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.
Powered by WordPress