Declaring the Faces servlet is the first necessary step in developing a JSF application. The following XML snippet (from WEB-INF/web.xml) allows the servlet to be declared and specifies that all requests ending in *.jsf are passed to the Faces servlet which routes them to the corresponding JSP page.
<servlet-name>Faces Servlet</servlet-name>
<servlet-name>Faces Servlet</servlet-name>
I've noticed that when you create a JSF project in NetBeans, a different servlet mapping is used. NetBeans creates a servlet mapping with a url-pattern of /faces/* as shown below:
<servlet-name>Faces Servlet</servlet-name>
I don't know if there is a standard convention to use here or if one is better than the other?
2/8/2011 05:56:38 pm

I’d like to know if you already know what’s the difference in using /faces/* or *.jsf inside url-pattern web.xml tag. I’m studying about it and trying to know what does FacesServlet do with incoming uri from client requests.


Leave a Reply.