How can I use a JSF page as welcome file? The FacesServlet is mapped on *.jsf and the <welcome-file> is set to index.xhtml. However, it does not show the JSF components. I tried to set the <welcome-file> to index.jsf, but this results in a HTTP 404 error.
I’m using Tomcat 6.0 and JSF 2.1.
Just rename
<welcome-file>entry ofindex.xhtmltoindex.jsfand create an emptyindex.jsffile next toindex.xhtmlto fool the container that the file actually exist.Alternatively, you can also just get rid of the
.jsfextension altogether and use.xhtmlall the way. This can be done by changing<url-pattern>ofFacesServletfrom*.jsfto*.xhtml.