SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Downloaden Sie, um offline zu lesen
Subject: Advanced Java (2160707)	
Institute: Silver Oak College of Engineering and Technology. 	
Copyright © 2017 by Milap Bhanderi 1
JSF Request Processing Life Cycle
by	
Milap Bhanderi
JSF application life cycle consists of six phases
which are as follows :	
• Restore view phase	
• Apply request values phase; process events	
• Process validations phase; process events	
• Update model values phase; process events	
• Invoke application phase; process events	
• Render response phase	
2Copyright © 2017 by Milap Bhanderi
3Copyright © 2017 by Milap Bhanderi
•  JSF begins the restore view phase as soon as a link or a buRon is
clicked and JSF receives a request.	
•  During this phase, JSF builds the view, wires event handlers and
validators to UI components and saves the view in the FacesContext
instance. 	
•  The FacesContext instance will now contain all the information
required to process a request.	
4Copyright © 2017 by Milap Bhanderi
Phase 2: Apply request values	
•  After the component tree is created/restored, each component in the
component tree uses the decode method to extract its new value from
the request parameters. Component stores this value. 	
•  If the conversion fails, an error message is generated and queued on
FacesContext. 	
•  This message will be displayed during the render response phase,
along with any validation errors.	
•  If any decode methods event listeners called renderResponse on the
current FacesContext instance, the JSF moves to the render response
phase.	
5Copyright © 2017 by Milap Bhanderi
Phase 3: Process validation	
•  During this phase, JSF processes all validators registered on the
component tree.	
•  It examines the component aRribute rules for the validation and
compares these rules to the local value stored for the component.	
•  If the local value is invalid, JSF adds an error message to the
FacesContext instance, and the life cycle advances to the render
response phase and displays the same page again with the error
message.	
6Copyright © 2017 by Milap Bhanderi
Phase 4: Update model values	
•  After the JSF checks that the data is valid, it walks over the
component tree and sets the corresponding server-side object
properties to the components' local values.	
•  JSF will update the bean properties corresponding to the input
component's value aRribute.	
•  If any updateModels methods called renderResponse on the current
FacesContext instance, JSF moves to the render response phase.	
7Copyright © 2017 by Milap Bhanderi
Phase 5: Invoke application	
•  During this phase, JSF handles any application-level events, such as
submiRing a form/linking to another page.	
8Copyright © 2017 by Milap Bhanderi
Phase 6: Render response	
•  During this phase, JSF asks container/application server to render the
page if the application is using JSP pages. 	
•  For initial request, the components represented on the page will be
added to the component tree as JSP container executes the page. 	
•  If this is not an initial request, the component tree is already built so
components need not be added again. 	
•  In either case, the components will render themselves as the JSP
container/Application server traverses the tags in the page.	
•  After the content of the view is rendered, the response state is saved
so that subsequent requests can access it and it is available to the
restore view phase.	
9Copyright © 2017 by Milap Bhanderi
10Copyright © 2017 by Milap Bhanderi

Weitere ähnliche Inhalte

Was ist angesagt?

Unit 3 principles of programming language
Unit 3 principles of programming languageUnit 3 principles of programming language
Unit 3 principles of programming language
Vasavi College of Engg
 
4.file service architecture
4.file service architecture4.file service architecture
4.file service architecture
AbDul ThaYyal
 

Was ist angesagt? (20)

Unit 4
Unit 4Unit 4
Unit 4
 
Asp.net.
Asp.net.Asp.net.
Asp.net.
 
Introduction to Virtualization
Introduction to VirtualizationIntroduction to Virtualization
Introduction to Virtualization
 
Presentation On Com Dcom
Presentation On Com DcomPresentation On Com Dcom
Presentation On Com Dcom
 
Unit 3 principles of programming language
Unit 3 principles of programming languageUnit 3 principles of programming language
Unit 3 principles of programming language
 
10 implementing subprograms
10 implementing subprograms10 implementing subprograms
10 implementing subprograms
 
dot net technology
dot net technologydot net technology
dot net technology
 
Virtual Machine Concept
Virtual Machine ConceptVirtual Machine Concept
Virtual Machine Concept
 
Multiple inheritance possible in Java
Multiple inheritance possible in JavaMultiple inheritance possible in Java
Multiple inheritance possible in Java
 
4.file service architecture
4.file service architecture4.file service architecture
4.file service architecture
 
Virtual machine
Virtual machineVirtual machine
Virtual machine
 
Perspective in Informatics 3 - Assignment 2 - Answer Sheet
Perspective in Informatics 3 - Assignment 2 - Answer SheetPerspective in Informatics 3 - Assignment 2 - Answer Sheet
Perspective in Informatics 3 - Assignment 2 - Answer Sheet
 
Android intents
Android intentsAndroid intents
Android intents
 
Java programming -Object-Oriented Thinking- Inheritance
Java programming -Object-Oriented Thinking- InheritanceJava programming -Object-Oriented Thinking- Inheritance
Java programming -Object-Oriented Thinking- Inheritance
 
Advance Java Programming (CM5I)5.Interacting with-database
Advance Java Programming (CM5I)5.Interacting with-databaseAdvance Java Programming (CM5I)5.Interacting with-database
Advance Java Programming (CM5I)5.Interacting with-database
 
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSINGINTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
 
Common language runtime clr
Common language runtime clrCommon language runtime clr
Common language runtime clr
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.net
 
Algorithm and pseudocode conventions
Algorithm and pseudocode conventionsAlgorithm and pseudocode conventions
Algorithm and pseudocode conventions
 
Delegates and events in C#
Delegates and events in C#Delegates and events in C#
Delegates and events in C#
 

Ähnlich wie JSF Request Processing Lifecycle

Ähnlich wie JSF Request Processing Lifecycle (20)

JSF.pptx
JSF.pptxJSF.pptx
JSF.pptx
 
Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)
 
TY.BSc.IT Java QB U5
TY.BSc.IT Java QB U5TY.BSc.IT Java QB U5
TY.BSc.IT Java QB U5
 
TY.BSc.IT Java QB U5&6
TY.BSc.IT Java QB U5&6TY.BSc.IT Java QB U5&6
TY.BSc.IT Java QB U5&6
 
Java EE 7 Recipes
Java EE 7 RecipesJava EE 7 Recipes
Java EE 7 Recipes
 
18 Invaluable Lessons About ADF-JSF Interaction
18 Invaluable Lessons About ADF-JSF Interaction18 Invaluable Lessons About ADF-JSF Interaction
18 Invaluable Lessons About ADF-JSF Interaction
 
Introduction to jsf 2
Introduction to jsf 2Introduction to jsf 2
Introduction to jsf 2
 
React and Flux life cycle with JSX, React Router and Jest Unit Testing
React and  Flux life cycle with JSX, React Router and Jest Unit TestingReact and  Flux life cycle with JSX, React Router and Jest Unit Testing
React and Flux life cycle with JSX, React Router and Jest Unit Testing
 
React Native Firebase
React Native FirebaseReact Native Firebase
React Native Firebase
 
Migrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDI
Migrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDIMigrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDI
Migrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDI
 
Jsf 2
Jsf 2Jsf 2
Jsf 2
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVC
 
Asp.net control
Asp.net controlAsp.net control
Asp.net control
 
Everything to Know About React Re-Rendering: A Comprehensive Guide
Everything to Know About React Re-Rendering: A Comprehensive GuideEverything to Know About React Re-Rendering: A Comprehensive Guide
Everything to Know About React Re-Rendering: A Comprehensive Guide
 
Reactjs
Reactjs Reactjs
Reactjs
 
Introduction to React, Flux, and Isomorphic Apps
Introduction to React, Flux, and Isomorphic AppsIntroduction to React, Flux, and Isomorphic Apps
Introduction to React, Flux, and Isomorphic Apps
 
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache TomcatCase Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
 
Mastering OmniFaces - A Problem to Solution Approach
Mastering OmniFaces - A Problem to Solution ApproachMastering OmniFaces - A Problem to Solution Approach
Mastering OmniFaces - A Problem to Solution Approach
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
Spring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 IntegrationSpring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 Integration
 

Mehr von Milap Bhanderi

Mehr von Milap Bhanderi (8)

Detailed Research on Fake News: Opportunities, Challenges and Methods
Detailed Research on Fake News: Opportunities, Challenges and MethodsDetailed Research on Fake News: Opportunities, Challenges and Methods
Detailed Research on Fake News: Opportunities, Challenges and Methods
 
SDN and it’s Application in Wireless Mesh Network
SDN and it’s Application in Wireless Mesh NetworkSDN and it’s Application in Wireless Mesh Network
SDN and it’s Application in Wireless Mesh Network
 
Email Marketing Course: HubSpot Academy [ALL YOU NEED]
Email Marketing Course: HubSpot Academy [ALL YOU NEED]Email Marketing Course: HubSpot Academy [ALL YOU NEED]
Email Marketing Course: HubSpot Academy [ALL YOU NEED]
 
BCD to Decimal - Digital Electronics
BCD to Decimal - Digital ElectronicsBCD to Decimal - Digital Electronics
BCD to Decimal - Digital Electronics
 
Relational Algebra
Relational AlgebraRelational Algebra
Relational Algebra
 
Rules for Block Diagram Reduction - Digital Electronics
Rules for Block Diagram Reduction - Digital ElectronicsRules for Block Diagram Reduction - Digital Electronics
Rules for Block Diagram Reduction - Digital Electronics
 
Operators in c
Operators in cOperators in c
Operators in c
 
ACOUSTIC - Physics
ACOUSTIC - Physics  ACOUSTIC - Physics
ACOUSTIC - Physics
 

Kürzlich hochgeladen

Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 

JSF Request Processing Lifecycle

  • 1. Subject: Advanced Java (2160707) Institute: Silver Oak College of Engineering and Technology. Copyright © 2017 by Milap Bhanderi 1 JSF Request Processing Life Cycle by Milap Bhanderi
  • 2. JSF application life cycle consists of six phases which are as follows : • Restore view phase • Apply request values phase; process events • Process validations phase; process events • Update model values phase; process events • Invoke application phase; process events • Render response phase 2Copyright © 2017 by Milap Bhanderi
  • 3. 3Copyright © 2017 by Milap Bhanderi
  • 4. •  JSF begins the restore view phase as soon as a link or a buRon is clicked and JSF receives a request. •  During this phase, JSF builds the view, wires event handlers and validators to UI components and saves the view in the FacesContext instance. •  The FacesContext instance will now contain all the information required to process a request. 4Copyright © 2017 by Milap Bhanderi
  • 5. Phase 2: Apply request values •  After the component tree is created/restored, each component in the component tree uses the decode method to extract its new value from the request parameters. Component stores this value. •  If the conversion fails, an error message is generated and queued on FacesContext. •  This message will be displayed during the render response phase, along with any validation errors. •  If any decode methods event listeners called renderResponse on the current FacesContext instance, the JSF moves to the render response phase. 5Copyright © 2017 by Milap Bhanderi
  • 6. Phase 3: Process validation •  During this phase, JSF processes all validators registered on the component tree. •  It examines the component aRribute rules for the validation and compares these rules to the local value stored for the component. •  If the local value is invalid, JSF adds an error message to the FacesContext instance, and the life cycle advances to the render response phase and displays the same page again with the error message. 6Copyright © 2017 by Milap Bhanderi
  • 7. Phase 4: Update model values •  After the JSF checks that the data is valid, it walks over the component tree and sets the corresponding server-side object properties to the components' local values. •  JSF will update the bean properties corresponding to the input component's value aRribute. •  If any updateModels methods called renderResponse on the current FacesContext instance, JSF moves to the render response phase. 7Copyright © 2017 by Milap Bhanderi
  • 8. Phase 5: Invoke application •  During this phase, JSF handles any application-level events, such as submiRing a form/linking to another page. 8Copyright © 2017 by Milap Bhanderi
  • 9. Phase 6: Render response •  During this phase, JSF asks container/application server to render the page if the application is using JSP pages. •  For initial request, the components represented on the page will be added to the component tree as JSP container executes the page. •  If this is not an initial request, the component tree is already built so components need not be added again. •  In either case, the components will render themselves as the JSP container/Application server traverses the tags in the page. •  After the content of the view is rendered, the response state is saved so that subsequent requests can access it and it is available to the restore view phase. 9Copyright © 2017 by Milap Bhanderi
  • 10. 10Copyright © 2017 by Milap Bhanderi