JSF (Java Server Faces) is a representation layer technology currently specified as a VIEW layer standard. The current version is 1.1. Struts is a more wide open source MVC framework. There are many people used in China, and the current version is also 1.1.
The author is working on a project framework, so these two technologies have been studied. I intend to make a pair and analysis of the knowledge you have mastered. Because it is a beginner, there may be incorrect or incomplete places, I hope everyone can actively discuss and correct.
It is said that the main person in charge of JSF is the main authors of Struts, so there are still many similar points.
TAGLIB is used to handle the representation layer: In the JSP page, both use a set of tag libraries to handle the page representation and the MODEL layer interaction. Both use the bean as a Model layer corresponding to the JSP page. The MODEL layer saves data on the JSP page, and you can do some verification work. In Struts, FORMBEAN is FORMBEAN, in JSF is Back Bean. Both beans are used as the control layer. The ActionBean is used in Struts to handle business logic. For simple applications, the business logic code can be written directly in the ActionBean, or call additional beans or EJBs to handle business logic; for JSF, BACKING BEAN is used To handle business logic, the BACKING BEAN can also directly write business logic or call other beans to handle business logic. All issues with XML configuration files are used to process the configuration of beans, page navigation, and other issues, increase the flexibility of the system. All resource documents are used to handle international and localization issues. However, there are many different points of the two, and below shows: