title: How to conditionally include a file in my template using JSF and Facelets?
body: <p>So, my template includes a footer.xhtml</p>
  
  <pre><code>&lt;ui:include src="/WEB-INF/testtaker/Footer.xhtml"/&gt;
  </code></pre>
  
  <p>What I want to do is change the footer based on some users pref to different Footer_???.xhtml file.</p>
  
  <p>So, I'd like to do something like this:</p>
  
  <pre><code>&lt;ui:include src="/WEB-INF/testtaker/Footer_001.xhtml"&gt;
        Content from original Footer.xhtml
  &lt;/ui:include&gt;
  </code></pre>
  
  <p>and if Footer_001.xhtml doesn't exist, then let it use the content between the tags, otherwise use the content from the file.</p>
  
  <p>I know this seems a little odd, but this will solve a huge problem of customizing my existing site with out having to make changes to includes all over the place.  Plus I'm not sure the file will exist before hand or not.</p>
  
  <p>Any thoughts?</p>