To use Java Server Face (JFS) in Eclipse MyEclipse: Introducing the JSF Create Wizard, create a JSF project based on the MYECLIPSE's profile. The specific content is as follows: 1.J2ee's Web Project Project Creation 2. Add JSF Package to Engine (Add JSF Capabilities To A Web Project) Create a related package and profile. 3. Add a JFS page (a special in JSP) Format file) Note: Taglib that is introduced in the page is generally introduced as follows: <% @ taglib uri = "http://java.sun.com/jsf/html" prefix = "h"%> // main Is the Taglib <% @ taglib uri = "http://java.sun.com/jsf/core" prefix = "f"%> // mainly page displayed Taglib, such as from the package .properties Extract the key configurable display. 4. Create a related package and class. It is usually used to process Class. (That is, javabean) 5. You need to modify or write JavaBean and JSF as needed. 7. To modify the configuration file: For example, for, for example, .Properties file, Face-config.xml file, etc. 6. Deploy the same as general deployment method to the server. It can be run. (The requirements for the server are relatively high, WebLogic8.1 has warnings to these Taglib)
Explain: 1. For some configurable page content, you can put it under the associated package. Then in the JFS file where com.login.MessageBundle indicates the name of the name value of the MessageBundle.Properties file content under the com.login package. Bundle is a variable in the JFS file, with the name in the .properties file as an attribute, the value of the corresponding value is attribute. He can be referenced by other places. 2. Communication between JavaBean and JF via the Faces-Config.xml file. Similar to Struts-Config. /login.jsp from-view-id> <- first displayed page, his processing results come from JavaBean, but the subsequent page display is indicated by the reference to the corresponding to the . -> Success from-outcome> /loginsuccessfully.jsp to-view-id> navigation-case> Failure from-outcome> /login.jsp to-view-id> navigation-case> navigation-rule> <- - Definition of bean used -> bean buy to handle all user-based Operations. Description> Userbean managed-bean-name> com.login.use.userbean managed-bean-class> session management-bean-scope> <- indicates the applicable session -> managed-bean> faces -config> 3. Details for the attributes of the label can be referred to the relevant .tld file. 4. The page can be used directly, set, request the methods and properties in the JavaBean.
For example: 5.jsf file itself is a JSP Documents (in jsp are the suffix name), and in the request, you should request it with the corresponding .facs file. Summary: JSF is only separately separated from the information, but also separates the contents of the page. This not only achieves separation of processing and pages, but also the separation of page content.