Hi this is my folder structure:
-Web Pages
-WEB-INF
-template.xhtml
-gebruiker
-index.xhtml
-index.xhtml
and now I'm trying to link from index.html to gebruiker/index.xhtml
I do this as follows:
index.xhtml:
<h:form>
<h:commandButton value="gebruiker" action="#{labelController.gebruiker()}"/>
</h:form>
bean:
public String gebruiker(){
return "gebruiker/index";
}
And if I run this I get a IO.FileNotFoundException without any useful detail...
I know the problem is because the index.xhtml in gebruiker folder uses a template it looks like this:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
template="./WEB-INF/template.xhtml">
<ui:define name="title">
Project Label Configurator
</ui:define>
<ui:define name="body">
GEBRUIKER PAGINA
</ui:define>
</ui:composition>
When I use plain xhtml instead of composition tags, the mapping works.
Anyone knows why?
my web.xml:
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>