Download FAQ History |  | API Search Feedback

> ## What is a JavaServer Faces Application?

> For the most part, JavaServer Faces applications are just like any other Java Web application. They run in a Java Servlet container, and they typically contain:

> - JavaBeans components (called model objects in JavaServer Faces technology) containing application-specific functionality and data
> - Event listeners
> - Pages, such as JSP pages
> - Server-side helper classes, such as database-access beans

> In addition to these items, a JavaServer Faces application also has:

> - A custom tag library for rendering UI components on a page
> - A custom tag library for representing event handlers, validators, and other actions.
> - UI components represented as stateful objects on the server
> - Validators, event handlers, and navigation handlers

> Every JavaServer Faces application must include a custom tag library that defines the tags representing UI components and a custom tag library for representing other core actions, such as validators and event handlers. Both of these tag libraries are provided by the JavaServer Faces implementation.

> The component tag library eliminates the need to hard-code UI components in HTML or another markup language, resulting in completely reusable components. And, the core tag library makes it easy to register events, validators, and other actions on the components.

> The component tag library can be the `html_basic` tag library included with the JavaServer Faces technology reference implementation, or you can define your own tag library that renders custom components or renders output other than HTML.

> Another important advantage of JavaServer Faces applications is that the UI components on the page are represented as stateful objects on the server. This allows the application to manipulate the component state and wire client-generated events to server-side code.

> Finally, JavaServer Faces technology allows you to convert and validate data on individual components and report any errors before the server-side data is updated.

> This tutorial provides more detail on each of these features.

Download FAQ History |  | API Search Feedback

All of the material in The Java(TM) Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.