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]

Getting started with JavaServer Faces 1.2, Part 1: Building basic applications

Richard Hightower
Rick Hightower serves as chief technology officer for ArcMind Inc.. He is coauthor of the popular book Java Tools for Extreme Programming and coauthor of Professional Struts and Struts Live. Rick is the founding developer on the Crank project, a JSF/Facelets, Ajax, CRUD framework for idiomatically developing GUIs.

Summary:  Java™Server Faces (JSF) technology, a server-side framework that offers a component-based approach to Web user-interface development, has come a long way. JSF 1.2 (incorporated into Java Enterprise Edition 5) has fixed some JSF pain points and added some nice features. This tutorial series covers how to get started with JSF 1.2. It's heavy on examples and light on theory — just what you need to get started quickly.

View more content in this series

Date:  18 Dec 2007
Level:  Introductory PDF:  A4 and Letter (878 KB | 43 pages)Get Adobe® Reader®

Activity:  99871 views
Comments:  

Before you start

About this series

This tutorial series is about getting started with JavaServer Faces (JSF) technology, a server-side user-interface component framework for Java-based Web applications. The series is for developers who are new to JSF and want to come up to speed quickly — not just with JSF, but with using JSF components to reduce effort. The series covers just the essentials, with lots of examples.

JSF is a more-traditional GUI development environment like AWT, SWT, and Swing. One of its major benefits is that it makes Web development easier by putting the hard work on the framework developers, not the application developers. Granted, JSF itself is more complex than many other Web frameworks, but the complexity is hidden from the application developer. It is much easier to develop Web applications in JSF than in most other frameworks: it requires less code, less complexity, and less configuration.

If you are doing Java server-side Web development, JSF is the easiest framework to learn. It is geared for creating Web applications (not Web sites per se). It allows you to focus on your Java code without handling request objects, session objects, request parameters, or dealing with complicated XML files. With JSF, you can get more things done more quickly than with other Java Web frameworks.


About this tutorial

This tutorial takes a basic approach to JSF development. You won't use fancy tools or IDE support in this tutorial (although tool support is a main benefit of JSF). You'll do bare-knuckled programming! I cover the essentials with just enough theory to keep the discussion going and keep you productively learning to use JSF to build Web applications. You might be surprised to learn that JSF is easier to program than other Java Web frameworks, even without fancy IDE tools.


Objectives

In this tutorial, you get an overview JSF's features and learn how to write a basic JSF application. You build a simple calculator application and, in subsequent iterations, improve its look and feel, modify its structure to add dependency injection, and implement JSF's navigation mechanism. In Part 2, you'll build custom converters, validators, and phase-listeners.


Who should take this tutorial?

If you are new to JSF, this tutorial is for you. Even if you have used JSF but have not tried out the JSF 1.2 features or have only used GUI tools to build JSF applications, you will likely learn a lot from both tutorials in this series.


Prerequisites

This tutorial is written for Java developers whose experience is at a beginning to intermediate level. You should have a general familiarity with using the Java language, with some GUI development experience.


System requirements

To run the examples in this tutorial, you need a Java development environment (JDK) and Apache Maven. It helps to have a Java IDE. Maven project files and Eclipse Java EE and Web Tools Project (WTP) project files are provided. See Download to obtain the example code.

1 of 10 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Java technology, Web development
ArticleID=276377
TutorialTitle=Getting started with JavaServer Faces 1.2, Part 1: Building basic applications
publish-date=12182007
author1-email=rhightower@arc-mind.com
author1-email-cc=jaloi@us.ibm.com

IBM SmartCloud trial. No charge.

IBM PureSystems on a kaleideoscope background

Unleash the power of hybrid cloud computing today!


Special offers