faces-config.xml

<quote>
<?xml version="1.0" encoding="UTF-8"?>

<faces-config
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
    version="2.0">
    <managed-bean>
        <managed-bean-name>userLogin</managed-bean-name>
        <managed-bean-class>org.ssc.webapp.UserLogin</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
        <display-name>Administration.xhtml</display-name>
        <from-view-id>/Administration.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>doLogin</from-outcome>
            <to-view-id>/Login.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <display-name>Login.xhtml</display-name>
        <from-view-id>/Login.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>loggedIn</from-outcome>
            <to-view-id>/Administration.xhtml</to-view-id>
            <redirect />
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <display-name>Administration.xhtml</display-name>
        <from-view-id>/Administration.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>loggedOut</from-outcome>
            <to-view-id>/Default_RF.htm</to-view-id>
            <redirect />
        </navigation-case>
    </navigation-rule>

</faces-config>
</quote>
Comments