JSF Framework architecture

In JSF application JavaBean classes are act as a model and contains data and business logic. Commonly a JSP or Facelets (XHTML) page is used for view. JSF components are used to bind the view and model. FacesServlet act as a controller and use component tree to do all task like get request, gathering, validating and converting user input, put it into model objects, action invocation and render response.

Entry of FacesServlet in web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" 
    	xmlns="http://java.sun.com/xml/ns/javaee" 
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
    	http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
 
    <servlet>
        <servlet-name>faces</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
 
    <servlet-mapping>
        <servlet-name>faces</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
 
</web-app>

 

Content Protection by DMCA.com
Please Share