JSF stands for Java Server Faces. JSF is MVC (Model - View - Controller) based user interface ( UI ) Java Web framework which has server-side components for building Java web applications user interfaces. JSF provides a well defined programming model and various tag libraries. With the help of JSF, Java-ee web developers can easily and quickly build enterprise java web applications.
Faces Response:
Faces response is the response which generates by the execution of the Render Response phase of the request processing life cycle.
Non-Faces Response:
None faces response is the response which generates by the execution of the render response phase of the request processing life cycle.
Non-Faces Request:
A request that was sent to an application component like a servlet or JSP page, instead of a Faces view.
Web application may also receive non-Faces requests that generate non-Faces responses. Because such requests do not involve Java Server Faces at all.
Below is the Execute and Render life cycle diagram.
JSF provides ease-of-use in the following ways:
- Provides reusable UI components to construct User interfaces.
- Provides facility in application data migration to and from the UI
- Provides facility to manage UI state across server requests
- Provides facility to wire client side events to server side application code
- Provides provision for building and reusable of custom UI components
- Provides encapsulation of the differences in markup across different browsers and client.
- Provides support for form processing
- Provides page-to-page navigation handling in response to UI events and model interactions.
Generally Web user interfaces follow a request / response pattern with web servers to display required information on web interfaces. In the case of Web browsers, an initial HTTP GET or HTTP POST request is made to the Web server which responds with a required processed document / data. The web server responses to each of these subsequent requests are usually documents, images, JavaScript files, CSS Style Sheets and other artifacts.
Here we will discuss JSF Faces View Request / Response life cycle. When JSF lifecycle involves in rendering the initial response, processing of initial request, a response for request and any automatically subsequent requests from user interface and their related responses is called a Faces View Request / Response.
Below diagram is of JSF Faces View Request / Response.
Below diagram is of JSF Faces View Request / Response.
There are well defined request processing life cycle phases, each Faces View Request/Response goes through these phases. There are three different scenarios for request / response
- Non faces request generates faces response
- Faces request generates faces response
- Faces request generates non faces response
Faces Response:
Faces response is the response which generates by the execution of the Render Response phase of the request processing life cycle.
Non-Faces Response:
None faces response is the response which generates by the execution of the render response phase of the request processing life cycle.
Faces Request:
It is the request that was sent from a previously generated Faces response.
It is the request that was sent from a previously generated Faces response.
Non-Faces Request:
A request that was sent to an application component like a servlet or JSP page, instead of a Faces view.
Web application may also receive non-Faces requests that generate non-Faces responses. Because such requests do not involve Java Server Faces at all.
Sample JSF Web Page Code:
Below is the example JSF Page code
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>JSF 2.0 Example Code</title>
</h:head>
<h:body>
<h3>JSF 2.0 Hello World Example - welcome.xhtml</h3>
<h4>Welcome #{sayHelloBean.name}</h4>
<h:form id="mainForm">
<h:outputLabel for="enterName" value="Enter Name"/>
<h:inputText id="enterName" value="#{sayHelloBean.name}"/>
<h:commandButton value="Say Hello" action="#{sayHelloBean.sayHello}"/>
</h:form>
</h:body>
</html>
Great interesting post
ReplyDeletewebsite development
Web development Company
Real Estate Companies in Chennai
ReplyDeleteReal Estate Brokers in Chennai
Real Estate Agents in Chennai
Real Estate Advisory in India
Real Estate Private Equity in Chennai
Real Estate Research in Chennai
Real Estate Tax Advisor in Chennai
Legal advisor in Chennai
this post is veryy helpfull for me.thankyou for shareing such a benificial .
ReplyDeleteprofessional-web-design-company
this articles help me in finding answer of my questins.thankyou for shareing this helpfull article.
ReplyDeleteprofessional-web-design-company
i came to know about JSF.thankyou for increasing my knowledge.thankyou for shareing this articles.
ReplyDeleteprofessional-web-design-company
It was not an easy topic to elaborate in such a short span of time. Custom Designed Websites is such a complex topic but you made it easy to understand
ReplyDeleteThanks meant for sharing this type of satisfying opinion, written piece is fastidious, that’s why I’ve read it completely.Custom Websites For Small Businesses
ReplyDeleteI adore your work, and it greatly motivates me.
ReplyDeleteQA Testing Services
This comment has been removed by the author.
ReplyDeleteThis was lovely thanks for writing this
ReplyDelete