background image

What Is a JavaServer Faces Application

<< JavaServer Faces Technology Benefits | Steps in the Development Process >>
<< JavaServer Faces Technology Benefits | Steps in the Development Process >>

What Is a JavaServer Faces Application

Another important goal of JavaServer Faces technology is to leverage familiar UI-component
and web-tier concepts without limiting you to a particular scripting technology or markup
language. Although JavaServer Faces technology includes a JSP custom tag library for
representing components on a JSP page, the JavaServer Faces technology APIs are layered
directly on top of the Servlet API, as shown in
Figure 3­2
. This layering of APIs enables several
important application use cases, such as using another presentation technology instead of JSP
pages, creating your own custom components directly from the component classes, and
generating output for various client devices.
Most importantly, JavaServer Faces technology provides a rich architecture for managing
component state, processing component data, validating user input, and handling events.
What Is a JavaServer Faces Application?
For the most part, a JavaServer Faces application is like any other Java web application. A typical
JavaServer Faces application includes the following pieces:
A set of JSP pages (although you are not limited to using JSP pages as your presentation
technology)
A set of backing beans, which are JavaBeans components that define properties and
functions for UI components on a page
An application configuration resource file, which defines page navigation rules and
configures beans and other custom objects, such as custom components
A deployment descriptor (a web.xml file)
Possibly a set of custom objects created by the application developer. These objects might
include custom components, validators, converters, or listeners.
A set of custom tags for representing custom objects on the page
A JavaServer Faces application that includes JSP pages also uses the standard tag libraries
defined by JavaServer Faces technology for representing UI components and other objects on
the page.
A Simple JavaServer Faces Application
This section describes the general steps involved in developing a simple JavaServer Faces
application from the perspective of different development roles. These roles are:
Page author, who creates pages by using the JavaServer Faces tag libraries.
Application developer, who programs custom converters, validators, listeners, and backing
beans.
Component author, who creates custom UI components and renderers.
A Simple JavaServer Faces Application
Chapter 10 · JavaServer Faces Technology
287