Tell me more ×  I have some JSF xhtml pages like below.
|--<templates> (Directory) |   | |   |--userForm.xhtml |   | |
|--banner.xhtml  both pages are using the templates from
templates directory. My index file is getting the templates well
and works fine. I have a link from index.xhtml file to
register.xhtml. My register.xhtml is displayed like an xml file.
The reason is ttemplate is not applied to that.  But if I call
the register.xhtml like (faces/register.xhtml) then it displays
correctly.  What would be the reason? is there any workaround to
solve it?  share|improve this question add comment  2 Answers
up vote 5 down vote accepted  The URL of the link has to match
the url-pattern of the FacesServlet as definied in web.xml to
get JSF to run. If it is for example *.jsf, then the link should
point to register.jsf and not register.xhtml. Alternatively, if
you're using a JSF link component like <h:link>, then you can
also use the filename alone as outcome and JSF will worry about
generating the right URL.