Creating the faces-config.xml file – HP Integrity NonStop J-Series User Manual
Page 302

Creating the faces-config.xml File
This file contains configuration details for the MyFaces implementation.
To create the faces-config.xml file, complete the following steps
1.
Create the faces-config.xml file in the EmpInfo/WebContent/WEB-INF directory as
explained in the
Creating the EmpInfo-servlet.xml File
section in the
section.
2.
Modify the faces-config.xml file to include information about message bundle, backing
bean, and navigation rules.
After modification, the faces-config.xml file must appear as shown:
<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd" >
<faces-config>
<application>
<locale-config>
<default-locale>en</default-locale>
</locale-config>
<message-bundle>com.hp.empinfo.web.message</message-bundle>
</application>
<managed-bean>
<managed-bean-name>EmpBean</managed-bean-name>
<managed-bean-class>
com.hp.empinfo.web.EmpBean
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/pages/insert.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/pages/success.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/pages/insert.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>home</from-outcome>
<to-view-id>/pages/welcome.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/pages/welcome.jsp</from-view-id>
<navigation-case>
<from-outcome>insert</from-outcome>
<to-view-id>/pages/insert.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>update</from-outcome>
<to-view-id>/pages/empUpdate.jsp</to-view-id>
</navigation-case>
302 Integrating Frameworks