I need to clarify this doubt. I hope you help me.
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<display-name>jsfdemo</display-name>
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
Is that url-pattern (/ faces / *) mandatory to appear in all the URLs of my application? I see some examples when displaying your demos if they are immediately shown such a URL.
But it looks like this:
And if I add the / faces / it shows me the JSF component:
Let's say everything looks like novice questions and something I could have done wrong. But then I see projects like this:
That nowhere in the application uses the / faces / in its URL. The truth and I looked for something clear but I still can not understand if it goes or not going.
Plus: I just found one where you do not put the / faces / in the web.xml. I do not know what to think. Help please.