我使用的模板带有撇号,但似乎无法正确解决。我一直收到500 error
。我基本上是想从createorder.xhtml
导航到WEB-INF/templates/fullpagetemplate.xhtml
。
我现在在createorder.xhtml中的路径是:
template="/WEB-INF/templates/fullpagetemplate.jsf"
我不断收到异常:
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
文件结构的屏幕截图:
您需要在文件路径前添加WEB-INF
,这样才能导航到..
目录,首先需要向上一个目录:
template="../WEB-INF/templates/fullpagetemplate.jsf"