title: jsf facelets menu image in header
body: <p>i have developed web application using jsf facelets, i've configured a facelet for the ui header, menu, content and footer. But the problem is i've used one image in the header when logged in it shows the image when im clicking in the link in menu and redirected to next page the image is not displaying only when logged in it display else it won't display </p>
  
  <p>here is my facelet template xhtml page</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
        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;f:view contentType="text/html"&gt;
          &lt;h:head&gt;
              &lt;f:facet name="first"&gt;
                  &lt;meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/&gt;
                  &lt;title&gt;PrimeFaces&lt;/title&gt;
              &lt;/f:facet&gt;
          &lt;/h:head&gt;
  
          &lt;h:body&gt;
  
              &lt;p:layout fullPage="true"&gt;
  
                  &lt;p:layoutUnit position="north" size="100" resizable="true" closable="true" collapsible="true"&gt;
                      &lt;p:graphicImage value="logo.gif" /&gt;  
                  &lt;/p:layoutUnit&gt;
  
                  &lt;p:layoutUnit position="south" size="100" closable="true" collapsible="true"&gt;
                      Footer
                  &lt;/p:layoutUnit&gt;
  
                  &lt;p:layoutUnit position="west" size="180" header="Menu" collapsible="true"&gt;
                      &lt;ui:insert name="leftmenu"&gt;
                          &lt;div&gt;
                              &lt;ui:include src="leftmenu.xhtml" /&gt;
                          &lt;/div&gt;
                      &lt;/ui:insert&gt;
                  &lt;/p:layoutUnit&gt;
  
                  &lt;p:layoutUnit position="center"&gt;
                     &lt;ui:insert name="content"&gt;
                          Select one of the links on the left to proceed.
                      &lt;/ui:insert&gt;
                  &lt;/p:layoutUnit&gt;
  
              &lt;/p:layout&gt;
  
          &lt;/h:body&gt;
  
      &lt;/f:view&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>my left menu xhtml page</p>
  
  <pre><code>&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: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:head&gt; 
  &lt;body&gt; 
  &lt;h:form&gt;
      &lt;h:link value="Home" outcome="homePage"&gt;&lt;/h:link&gt;
      &lt;br /&gt;
      &lt;h:link value="Create User" outcome="addUser"&gt;&lt;/h:link&gt;
      &lt;br /&gt;
      &lt;h:link value="Change Password" outcome="addUser"&gt;&lt;/h:link&gt;
      &lt;br /&gt;
      &lt;h:link value="Allocation Tan" outcome="addUser"&gt;&lt;/h:link&gt;
      &lt;br /&gt;
      &lt;h:link value="Batch Upload" outcome="addUser"&gt;&lt;/h:link&gt;
      &lt;br /&gt;
      &lt;h:link value="XML Validation" outcome="addUser"&gt;&lt;/h:link&gt;
      &lt;br /&gt;
      &lt;h:link value="Logout" outcome="login"&gt;&lt;/h:link&gt;
  &lt;/h:form&gt;
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>my add user xhtml page</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:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"&gt;
      &lt;h:head&gt;
          &lt;title&gt;Facelet Title&lt;/title&gt;
      &lt;/h:head&gt;
      &lt;h:body&gt;
          &lt;ui:composition template="/templates/template.xhtml"&gt;       
              &lt;ui:define name="content"&gt;
                 &lt;h:form id="form"&gt;  
  
      &lt;p:panel id="panel" header="New Person"&gt;  
  
          &lt;p:messages id="msgs"/&gt;  
  
          &lt;p:commandButton id="btn" value="Save" update="panel" actionListener="#{user.save}"/&gt;  
      &lt;/p:panel&gt;  
  
  &lt;/h:form&gt;  
              &lt;/ui:define&gt;
          &lt;/ui:composition&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>can anyone help me to solve this problem</p>