title: jsf file not getting loaded from its location
body: <p>Here is my folder structure of my project,</p>
  
  <p><img src="https://i.stack.imgur.com/LJiXp.png" alt="enter image description here"></p>
  
  <p>File contents;
  commons.xhtml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"   
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"&gt; 
     &lt;h:head&gt;&lt;/h:head&gt;
     &lt;h:body&gt; 
        &lt;div style="border-width:2px; border-color:green; border-style:solid;"&gt;
           &lt;ui:insert name="header" &gt;
              &lt;ui:include src="/templates/header.xhtml" /&gt;
           &lt;/ui:insert&gt; 
        &lt;/div&gt;
        &lt;br/&gt;
        &lt;div style="border-width:2px; border-color:black; border-style:solid;"&gt;
           &lt;ui:insert name="content" &gt;
              &lt;ui:include src="/templates/contents.xhtml" /&gt;
           &lt;/ui:insert&gt;    
        &lt;/div&gt;
        &lt;br/&gt;
        &lt;div style="border-width:2px; border-color:red; border-style:solid;"&gt;
           &lt;ui:insert name="footer" &gt;
              &lt;ui:include src="/templates/footer.xhtml" /&gt;
           &lt;/ui:insert&gt;
        &lt;/div&gt;
     &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>contents.xhtml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"   
     xmlns:ui="http://java.sun.com/jsf/facelets"&gt;
     &lt;body&gt;
        &lt;ui:composition&gt; 
           &lt;h1&gt;Default Content&lt;/h1&gt;
        &lt;/ui:composition&gt; 
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>footer.xhtml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"   
     xmlns:ui="http://java.sun.com/jsf/facelets"&gt;
     &lt;body&gt;
        &lt;ui:composition&gt; 
           &lt;h1&gt;Default Footer&lt;/h1&gt;
        &lt;/ui:composition&gt; 
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>header.xhtml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"   
     xmlns:ui="http://java.sun.com/jsf/facelets"&gt;
     &lt;body&gt;
        &lt;ui:composition&gt; 
           &lt;h1&gt;Default Footer&lt;/h1&gt;
        &lt;/ui:composition&gt; 
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>home.xhtml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"   
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"&gt;
     &lt;h:body&gt;
        &lt;ui:composition template="templates/common.xhtml"&gt;    
           &lt;ui:define name="content"&gt;             
              &lt;br/&gt;&lt;br/&gt;
               &lt;h:link value="Page 1" outcome="page1" /&gt;
               &lt;h:link value="Page 2" outcome="page2" /&gt;          
              &lt;br/&gt;&lt;br/&gt;
           &lt;/ui:define&gt;
        &lt;/ui:composition&gt;
     &lt;/h:body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>page1.xhtml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"   
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"&gt;
     &lt;h:body&gt; 
        &lt;ui:composition template="templates/common.xhtml"&gt;
           &lt;ui:define name="header"&gt;
              &lt;h2&gt;Page1 header&lt;/h2&gt;
           &lt;/ui:define&gt;           
           &lt;ui:define name="content"&gt;
              &lt;h2&gt;Page1 content&lt;/h2&gt;
               &lt;h:link value="Back To Home" outcome="home" /&gt;
           &lt;/ui:define&gt; 
           &lt;ui:define name="footer"&gt;
              &lt;h2&gt;Page1 Footer&lt;/h2&gt;
           &lt;/ui:define&gt;           
        &lt;/ui:composition&gt; 
     &lt;/h:body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>page2.xhtml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"   
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"&gt;
     &lt;h:body&gt; 
        &lt;ui:composition template="templates/common.xhtml"&gt;
           &lt;ui:define name="header"&gt;
              &lt;h2&gt;Page2 header&lt;/h2&gt;
           &lt;/ui:define&gt;           
           &lt;ui:define name="content"&gt;
              &lt;h2&gt;Page2 content&lt;/h2&gt;
               &lt;h:link value="Back To Home" outcome="home" /&gt;
           &lt;/ui:define&gt; 
           &lt;ui:define name="footer"&gt;
              &lt;h2&gt;Page2 Footer&lt;/h2&gt;
           &lt;/ui:define&gt;           
        &lt;/ui:composition&gt; 
     &lt;/h:body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>When I run the server and run the page, I see a blank screen,</p>
  
  <p>I somehow feel the template file is not getting loaded from the correct location but where can I find the exact location the file is trying to load from.</p>
  
  <p>Html code of the file,</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"   
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"&gt;
     &lt;h:body&gt;
        &lt;ui:composition template="templates/common.xhtml"&gt;    
           &lt;ui:define name="content"&gt;             
              &lt;br/&gt;&lt;br/&gt;
               &lt;h:link value="Page 1" outcome="page1" /&gt;
               &lt;h:link value="Page 2" outcome="page2" /&gt;          
              &lt;br/&gt;&lt;br/&gt;
           &lt;/ui:define&gt;
        &lt;/ui:composition&gt;
     &lt;/h:body&gt;
  &lt;/html&gt; 
  </code></pre>