I am using templates with primefaces and I can't seem to get this right. I keep getting a 500 error
. I am basically trying to navigate from createorder.xhtml
to WEB-INF/templates/fullpagetemplate.xhtml
.
The path I have now in the createorder.xhtml is:
template="/WEB-INF/templates/fullpagetemplate.jsf"
I keep getting an exception:
Servlet.service() for servlet Faces Servlet threw exception: javax.faces.view.facelets.TagAttributeException: /order/createorder.xhtml @7,53 <ui:composition template="/WEB-INF/templates/fullpagetemplate.jsf"> Invalid path : /WEB-INF/templates/fullpagetemplate.jsf
Screenshot of file structure:
You need to go up one directory first before navigating to the WEB-INF
directory by preceding your file path with ..
like this:
template="../WEB-INF/templates/fullpagetemplate.jsf"