Learn Java for Web Development

(Tina Meador) #1
CHAPTER 6: Component-Based Web Development Using JSF 2 277

Life Cycle of a JSF Application


Unlike Struts and Spring Web MVC, the JSF life cycle performs the following request-processing
tasks in well-defined phases during which specific tasks are performed:


   Checking whether the incoming data is valid
 Triggering application logic to fulfill the request
 Binding the field properties directly to properties of the model and having their
values updated upon form submissions
 Rendering the response to the client

The following are the six phases of the JSF application life cycle, as illustrated in Figure 6-14:


   Restore View phase
 Apply Request Values phase
 Process Validation phase
 Update Model phase
 Invoke Application phase
 Render Response phase

Figure 6-13. Directory structure of the Hello World web application

Free download pdf