I cannot find out how navigate to page located in upper dir. Is it possible at all? here is my project structure:
question:
how should line <ui:composition template="web2/web/index.xhtml">
looks like in the code of any page from folder main_pages to include index.xhtml
and how to insert i.e. image from images folder (I can't get right path, io.exception still):
onas.xhtml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
>
<h:body>
<ui:composition template="web2/web/index.xhtml">
<ui:define name="centerContent">
<h:form>
<p:growl id="msg" showDetail="true" sticky="true" />
<p:panelGrid styleClass="myPanel">
<p:row>
<p:column>
<ui:param name="mainTag" value="Z chęcią odpowiemy" />
<h2>Zapytaj</h2>
<h4>#{mainTag}</h4></p:column>
</p:row>
<p:row>
<p:column><p:inputTextarea styleClass="myTextArea" autoResize="true" value="#{mySendBean.mailContent}"/></p:column>
<p:column>
<h:commandButton actionListener="#{mySendBean.sendMail2()}" value="Wyślij" update="msg">
</h:commandButton>
</p:column>
</p:row>
</p:panelGrid>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
when I change composition to be:
<ui:composition template="#{request.contextPath}/index.xhtml">
I get error:
/onas.xhtml @11,74 <ui:composition template="#{request.contextPath}/index.xhtml"> Invalid path : /web2/faces/index.xhtml
or if I add /faces/:
/onas.xhtml @11,74 <ui:composition template="#{request.contextPath}/faces/index.xhtml"> Invalid path : /web2/faces/index.xhtml