Skip to main content


developerWorks  >  Java technology | Web development  >

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

developerWorks

Level: Introductory

Richard Hightower (rhightower@arc-mind.com), CTO, ArcMind

18 Dec 2007

Register now or sign in using your IBM ID and password.

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.

In this tutorial

Share this tutorial

digg Digg this story
del.icio.us Post to del.icio.us
Slashdot Slashdot it!

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 and 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.

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

  • Get an overview JSF's features and learn how to write a basic JSF application.

  • Build a simple calculator application.

  • Improve the look and feel of the application.

  • Modify its structure to add dependency injection.

  • Implement JSF's navigation mechanism.

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. The example code is included with the tutorial.


To view the demos included in this tutorial, JavaScript must be enabled in your browser and Macromedia Flash Player 6 or higher must be installed. You can download the latest Flash Player at http://www.macromedia.com/go/getflashplayer/.


Duration

1 hour


Formats

html, pdf, swf


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!


Back to top


Document options

Document options requiring JavaScript are not displayed


More in this series:
Getting started with JavaServer Faces 1.2