title: absolute path in jsf not working
body: <p>I am new to jsf. </p>
  
  <p>I have basically 4 jsf files. </p>
  
  <p>1) menu.xhtml</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;h:html xmlns="http://www.w3.org/1999/xhtml" 
  xmlns:c="http://java.sun.com/jsp/jstl/core"
  xmlns:h="http://java.sun.com/jsf/html"    
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:ui="http://java.sun.com/jsf/facelets" 
  xmlns:p="http://primefaces.org/ui"&gt;
  
   &lt;h:head&gt;
  
  &lt;h:body&gt;
  
    &lt;p:layout fullPage="true"&gt;
     &lt;p:layoutUnit position="north" style="min-width: 300px;" gutter="0"&gt;
      &lt;ui:insert name="header"&gt;
       &lt;ui:include src="../../layout/header.xhtml" /&gt;
      &lt;/ui:insert&gt;
     &lt;/p:layoutUnit&gt;
  
     &lt;p:layoutUnit position="center" style="border:none;" gutter="0"&gt;
      &lt;p:panel id="content" style="background : transparent; border : 0;"&gt;
       &lt;ui:include src="content.xhtml" /&gt;
      &lt;/p:panel&gt;
     &lt;/p:layoutUnit&gt;
  
     &lt;p:layoutUnit position="west" collapsible="true" gutter="6"  &gt;
     &lt;h:panelGroup id="menu" layout="block"&gt;
     &lt;h:form&gt;
      &lt;ul&gt;
       &lt;li&gt;&lt;p:commandLink value="goto-include1" action="#{bean.doAction1}" update=":mainContent" ajax="true" /&gt;&lt;/li&gt;
       &lt;li&gt;&lt;p:commandLink value="goto-include2" action="#{bean.doAction2}" update=":mainContent" ajax="true" /&gt;&lt;/li&gt;
      &lt;/ul&gt;
     &lt;/h:form&gt;
    &lt;/h:panelGroup&gt;
     &lt;/p:layoutUnit&gt;
  
     &lt;p:layoutUnit position="south" style="min-width: 300px;" gutter="0"&gt;
      &lt;div id="footer" class="ui-widget ui-widget-header"&gt;
       &lt;ui:include src="../../layout/footer.xhtml"&gt;&lt;/ui:include&gt;
      &lt;/div&gt;
     &lt;/p:layoutUnit&gt;
  
    &lt;/p:layout&gt;`enter code here`
  
  
   &lt;/h:body&gt;
  &lt;/f:view&gt;
  &lt;/h:html&gt;
  </code></pre>
  
  <p>Include1.jsp</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;ui:composition xmlns="http://www.w3c.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"&gt;
          &lt;h:outputText value="Include1"/&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>Include2.jsp</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;ui:composition xmlns="http://www.w3c.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"&gt;
          &lt;h:outputText value="Include1"/&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>Include3.jsp</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;ui:composition xmlns="http://www.w3c.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"&gt;
          &lt;h:outputText value="Include1"/&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>Content.jsp</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;ui:composition xmlns="http://www.w3c.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"&gt;
      &lt;h:panelGroup id="mainContent" layout="block"&gt;
          &lt;ui:include src="#{bean.page}.xhtml" /&gt;
      &lt;/h:panelGroup&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>My bean class is as </p>
  
  <pre><code>package com.assia.dslo.expresse.gui.component.pe;
  
  import java.io.File;
  import java.io.Serializable;
  
  public class Bean implements Serializable {
  
      private String page = "include3";
      public String getPage() {
          return page;
      }
      public void setPage(String page) {
          this.page = page;
      }
      private static final long serialVersionUID = -802772877129109794L;
  
      public void doAction1() {
          this.page = "expresse/pe/include1.xhtml";
      }
  
      public void doAction2() {
          this.page = "include2";
      }
  }
  </code></pre>
  
  <p>The intended behavior is that when I click on the Include1 link , it displays the include1.jsf in the center frame and similarly for the Include2 link. </p>
  
  <p>However, the absolute path for Include1 does not work. If I replace the absolute path by a relative path,then it works fine. Can somebody help me understand why this happens ? Is this an expected behavior or there is something wrong that I am doing . </p>
  
  <p>Thanks</p>