What is JSF, JavaServer Faces?a. JavaServer Faces (JSF) is a server side Java technology, developed by Sun Microsystems, in the field of web application development. b. It eases the construction of user interfaces and provides the event-driven, component-based technology. c. The JSF specification has standard UI components and provides an API for developing components and extensions of the existing standard UI components.Explain the JSF life cycle.The JavaServer Faces page is similar to JSP page in terms of their life cycle. When user makes a request, the life cycle of a JSF web application, starts. Several tasks are performed by JSF when a user submits a page. These tasks include data validation, data type conversion, etc.
A JSF application supports two kinds of responses and two kinds of requests.
Faces response: Request processing life cycle creates a servlet response by the execution of the Render Response Phase of the.
Non-Faces response: A servlet response is not created by the execution of the render response phase.
Faces request: A servlet request is sent from a previously generated Faces response. E.g.: The request URI in the form submission from a JSF UI component, identifies the JSF component tree to use for processing the request.
Non-Faces request: A servlet request is sent to an application component, such as a servlet or JSP page, rather than directed to a JavaServer Faces component tree.
The steps in the life cycle of a JSF application are: 1. Restore View Phase 2. Apply Request Value Phase 3. Process Validations Phase 4. Update Model Value Phase 5. Invoke Application Phase 6. Render Response Phase
|