Introduction To JSF

What is JSF?

  1. JSF stands for Java Server Faces.
  2. JSF is a framework that allows us to make a nice user interface with the help of the reusable UI components.
  3. It provides the built-in support for the validation of the data entered by the user.
  4. JSF framework is based on Model-View-Controller (MVC) design pattern.

Advantages of JSF

  1. Easy UI Creation: With the help of the reusable and built-in UI components, it's easy to make a nice and attractive UI.

  2. Easy Validation: JSF provides the built-in validators and converters to validate and convert the user input.

  3. MVC design pattern: MVC segregates the business, controller and presentation logic.

  4. Faster development: Due to the segregation of the business and presentation layer, the designer and developer can work simultaneously to build Web Applications. This reduces the development life cycle time.

  5. Supports multiple client devices: JSF provides the different renderers to allow the rendering of the UI on the different client devices (Computers, mobile phones, tablets etc).

Overview of JSF Architecture


  • JSF is based on a MVC design pattern. Thus, the architecture mainly consists of the model, view and controller.

  • The Web Browsers and the Wireless Markup Language (WML) Browsers display the views to us like in any other Web Application.

  • We need a controller to process the requests. The FacesServlet is a controller component present in javax.webapp.faces package. FacesServlet helps to manage the JSF request processing life cycle. It accepts and processes the client requests and forwards them to the appropriate renderer component. HTML Browser request is forwarded to HTML renderer kit and WML Browser request is forwarded to WML renderer kit.

  • The renderer kit makes the response with the help of JavaBeans (models) and displays the response to the Client Browser.