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

I am currently learning JavaEE at school and see no point in the web.xml file and the face-config.xml file. I know from my 3rd edition of the Core Java Server Faces tutorial that the face-config file may have additional configuration options located in it. For example, I saw what I consider to be a declaration of some of my bean parameters in the 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 is hout web.xml for? The tutorial says that my web.xml and beans.xml are necessary for the application server to be happy. Ok, but how do web.xml and face-config.xml interact? They are? Are these two files as a frame for my painting and a canvas for me to paint?

+4
source share
2 answers

In a nutshell:

  • web.xml is a deployment descriptor, and it is part of the servlet standard for web applications. It is used to determine how URLs map to servlets, which URLs require authentication, and other information. This file is located in the WAR application in the WEB-INF / directory.

    Handling: Google Cloud Platform Documentation :

  • faces-config.xml JavaServer Faces ( XML-) . , , .

    : Java EE 5.

+4

, , , process.so java web.xml , java -, , . web.xml - Java.

0

Source: https://habr.com/ru/post/1615517/


All Articles