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 developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

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:  8323 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



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

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

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.