JSF Implementation: go into the world of MyFaces
MyFaces is an successful implementation of JSF specifications and it is the core members of Apache web framework family.In this recipe, we explore its core class in the code manner.
1. Facade Servlet
MyFacesServlet is the subclass of FacesServlet which is defined in web.xml. In its init method, it will parse the faces-config.xml and bind the servlet,filter instance to servlet context. As for the listener, components, and managed beans, they are bound to FacesContext.
2. Phases in the request process life-cycle
63 public void execute(FacesContext facesContext) 64 throws FacesException 65 { 66 if (restoreView(facesContext)) 67 { 68 return; 69 } 70 71 if (applyRequestValues(facesContext)) 72 { 73 return; 74 } 75 76 if (processValidations(facesContext)) 77 { 78 return; 79 } 80 81 if (updateModelValues(facesContext)) 82 { 83 return; 84 } 85 86 if (invokeApplication(facesContext)) 87 { 88 return; 89 } 90 }
补充:Web开发 , Jsp ,