At present, Java Community Process (JAVA SPECification Requests (JSR) 127 - Java Server Faces (JSF) (http://www.jcp.org/en/jsr/detail?id=127) is one WEB application framework standard based on Java technology is also a major supplement to J2EE standards. JSF makes it easy and conveniently designed to develop Java technology-based web applications, and applications developed are very easy to maintain, reuse and expand. The Java / J2EE industry generally believes that JSF will replace the current industry very popular Apache Struts framework in the near future.
JSF provides standard programming interfaces for developers based on Java-based web application user interface, rich and scalable UI component libraries (a core JSP tag library for handling events, executing verification, and other non-UI-related operations and one Standard HTML tag library to represent a complete web application framework such as the UI component), the event drive model, through JSF, you can easily use the web components in the page, capture the events generated by the user behavior, execute verification, establish Page navigation ..., you will find that when using development tools that support JSF to develop JSF applications, everything will become unusually simple, similar to what we have the same simple, GUI way to drag and drop components as we now develop VB or PowerBuilder programs. , Modify component properties, establish inter-component associations, and write event listeners, etc.
First, the JSF application requires some must run state components to ensure that it is running:
Faces Servlet - Configured in the J2EE Web Deployment Descriptor (Web.xml). Faces servlet is a JSF application engine. Different JSF applications in the same Web container will have its own Faces Servlet, which is similar to the role of Controller in Model-View-Controller, used to control all back-back-end applications. Components' requests, developers using the Apache Struts framework will find this component and strupler servlet. Faces profile - stores as a separate profile (Faces-Config.xml) in a web-inf / lib directory. This file is very similar to the configuration file of the Apache Struts framework to serve as the primary configuration file of the application component and navigation model. Some must-have JAR files - every JSF application must have a JAR file, stored in a web-inf / lib directory: jsf-api.jar, jsf-ri.jar, jstl.jar, standard.jar, commons-beanutils.jar , Commons-Digester.jar, Commons-Collections.jar, and Commons-Logging.jar.
Usually these components can help you generate or configure by a development tool that supports JSF, and a complete JSF application requires some other things, such as:
Manage JavaBean. Java objects used to define and bind the web UI components. JSP and HTML files. Complete the UI show. Page template. Define a JSF application unified page style and some universal META settings. Custom event listener. Events used to process user operations or component status changes.
Of course, the UI of the JSF application can be constructed without JSP / HTML, but constructs with a Well-Formed XML file.
A JSF application is actually a standard J2EE web application, which has a web deployment descriptor, JSP file, tag library, and a series of static resources, but it is only a series of running in a series compared to ordinary J2EE web applications. Special components in the J2EE Web container reach your own special running state mode, the event driver is one of the important features. Excerpted from http://www-900.ibm.com/developerWorks/cn/wsdd/library/techarticles/shengpy/jsf/jsf1.shtml