Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Build Apache Geronimo applications using JavaServer Faces, Part 3: Add Ajax functionality with Ajax4jsf

Dale de los Reyes (dreyes4@hotmail.com), Freelance Writer, 自由职业者
Dale de los Reyes graduated with a degree in computer science from California Polytechnic State University, San Luis Obispo, in 1996. His experience includes application development in J2EE/Java EE, C++ for Microsoft® Windows®, and COBOL for Mainframes. In his spare time, he takes photographs, practices martial arts, and pursues independent projects.

Summary:  In the first two installments of this five-part tutorial series you explored JavaServer™ Faces (JSF) -- a new Java™-based framework that makes it easier to build graphical user interfaces (GUIs) for Java Platform, Enterprise Edition (Java EE) applications -- built and successfully deployed a simple JSF application on Apache Geronimo, and learned how to integrate Apache Tomahawk -- which provides several custom, 100% JSF-compatible components -- with your application to improve the interface. In this tutorial, Part 3, you'll get familiar with the Sun Ajax4jsf open source framework, which adds Asynchronous JavaScript™ + XML (Ajax) capabilities to JSF applications without having to write any JavaScript code. You'll use Ajax4jsf to enhance your example application and create an Ajax-enabled front end.

View more content in this series

Date:  17 Oct 2006
Level:  Intermediate PDF:  A4 and Letter (266 KB | 24 pages)Get Adobe® Reader®

Activity:  10843 views
Comments:  

Before you start

This tutorial shows Java programmers how to build highly interactive Java EE applications for deployment on Apache Geronimo using the JSF components. The tutorial assumes you'll be using the Eclipse IDE as your development platform.

About this tutorial

This tutorial introduces you to the Sun Ajax4jsf open source framework, which adds Ajax capabilities to JSF applications without writing any JavaScript code. You'll continue to enhance the example application from Part 2 by adding a utility that converts temperature and displays the results graphically.

About this series

This tutorial is the third of a five-part series about building Apache Geronimo applications using JSF. Here's a rundown of the entire series:

  • Part 1: Use Eclipse and Apache MyFaces Core to build a basic application introduced you to using Apache's MyFaces implementation of the JSF standard with Geronimo, a free application server (also from Apache). This tutorial showed you how to use the Eclipse IDE's Web Tool Platform (WTP) to build JSF applications.
  • Part 2: Using Tomahawk with JavaServer Faces showed you how to integrate Apache Tomahawk components with your Geronimo application. Tomahawk provides several custom components that are 100% compatible with JSF.
  • Part 3: Using Ajax4jsf with JavaServer Faces demonstrates how to use Sun's free open source framework, Ajax4jsf, to add Asynchronous JavaScript + XML (Ajax) capabilities to your Geronimo application.
  • Part 4: Extend JSF with Apache Trinidad components teaches you how to integrate components from Apache Trinidad, the open source version of ADF Faces, with your Geronimo application to enhance your JSF application's interface.
  • Part 5: Integrating your JSF Application with Spring shows you how to integrate your JSF applications with the Spring Framework, a popular framework that makes it easier for Geronimo developers to build Java EE applications.
Check out the Ajax Resource Center, your one-stop shop for information on the Ajax programming model, including articles and tutorials, discussion forums, blogs, wikis, events, and news. If it's happening, it's covered here.

System requirements

You need the following tools to follow along with this tutorial:

  • Part 2 source code so you can add to that application.
  • Geronimo, Apache's Java EE server project. Geronimo comes in Tomcat and Jetty flavors, depending on your needs. We used the Jetty flavor (version 1.1) because it's smaller.
  • MyFaces, Apache's JSF implementation. Download the core version (without Tomcat) from Apache. We used version 1.1.3 with this tutorial.
  • Tomahawk, which provides additional components and input validators for use with MyFaces, while still maintaining 100% JSF compatibility.
  • Eclipse, the extensible open source IDE that supports a wide range of languages and platforms.
  • Eclipse Web Tools Platform (WTP), which adds support for XML and JavaScript editing, as well as preliminary JSF support, to Eclipse.
  • Ajax4jsf, Sun's open source framework for adding Ajax functionality to existing JSF applications. The current version is 1.0rc4 at the time of this writing.
  • Java 1.4 or newer installed on your system. Eclipse binaries come with their own Java run time, but Geronimo and MyFaces don't (that would seriously bloat up the download archives).

1 of 8 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source, Java technology, Web development
ArticleID=167509
TutorialTitle=Build Apache Geronimo applications using JavaServer Faces, Part 3: Add Ajax functionality with Ajax4jsf
publish-date=10172006
author1-email=dreyes4@hotmail.com
author1-email-cc=troy@backstopmedia.com