JavaServer Faces (JSF) is a web-based application framework. It is a request-driven MVC technology based on a component driven UI design model. As with Struts, JSF uses XML files for configuration and the integration of MVC elements.
Requests are processed by the FacesServlet, which loads the appropriate view template, builds a component tree, processes events, and renders the response to the client. The state of UI components (and other objects) is saved at the end of each request, and restored upon next creation of that view.
Several types of state persistence are available, including client-side and server-side state-saving.
JSF 1.x uses JavaServer Pages (JSP) for its display technology, but it can accommodate other technologies. JSF2 uses Facelets, a powerful view description language.
JSF Features:
- Inversion of Control (IoC), a methodology for leveraging Plain Old Java Objects (POJO).
- Template-based component system provides a means of creating composite component creation.
- Ajax support minimizes the requirement for JavaScript.
- Unified Expression Language (EL) which allows views to access Managed Bean properties and methods.
- A set of HTML and web-application specific UI components.
- A server-side event model for dispatching events and attaching listeners to system operations.
- State management for “request”, “session”, “application”, “flash”, and “view” scoped beans.
- XML-based tag libraries defining core and html functionality.