title: Redirect to XHTML file in a JSF Composite Component
body: <p>I have a requirement to add a button in one of the xhtml component. When a user clicks the button, a new window should open redirecting the user to another xhtml file which is also in the same component project.</p>
  
  <p>This is what I have in my component project,</p>
  
  <pre><code>|-&gt;src
    |-&gt; main
      |-&gt;java
        |-&gt;META-INF
          |-&gt;faces-config.xml
            |-&gt;resources
               |-&gt;components
                    |-&gt;A.xhtml
                    |-&gt;B.xhtml
  </code></pre>
  
  <p>I need to add a button in A.xhtml file which redirects the user to B.xhtml opening a new window. This component is being used in other projects. I tried commandButton with target=_blank, a new window opens but doesn't redirect to B.xhtml.</p>
  
  <p>I observed that if I use ui:include src="B.xhtml" tag in A.xhtml file, then the content of B appears in A. But couldn't find why it is not able to redirect in a new window. Not sure what I am missing and would like to know how this can be achieved.</p>