jsfjakarta-eeservletsweb.xmlfaces-config

The purpose of web.xml and faces-config.xml in Java EE?


I'm currently learning about JavaEE in school and haven't come across the meaning behind the web.xml file and the face-config.xml file. I know from my textbook "Core Java Server Faces" 3rd edition that the face-config file can have additional configuration parameters placed in it. For example I have seen what I believe to be declarations to some of my bean parameters in a face-config file and some navigation to other pages such as...

    <navigation-rule>
        <navigation-case>
            <from-outcome>startOver</from-outcome>
            <to-view-id>/index.xhtml</to-view-id>
        <navigation-case>
    </navigation-case>

And what the hoot is web.xml for? The textbook says my web.xml and beans.xml are needed to keep the application server happy. Okay cool but how does web.xml and face-config.xml interact? Do they? Are these two files like the frame for my painting and the canvas for me to paint on?


Solution

  • In a nutshell: