title: XML or text declaration not at start of entity
body: <p>Sorry being a bit daft. But I come to understand (my lack of knowledge) that it's not possible to forward to another page, if you want use <strong>RichFaces</strong> components on that page.</p>
  
  <p>This is some of the problems that I am experiance when forward to a page with RichFaces components</p>
  
  <ul>
  <li>If i forward to a page with a form, there is some  of the hundreds of included JavaScrips that is interpreted as a bad formatted XML tag.</li>
  <li>If I use nested tables, the tables loose the CSS file and look like normal JSF 2.0 dataTables.</li>
  <li>When forwarded to page with only a tabPanel as in the demo <a href="http://richfaces-showcase.appspot.com/richfaces/component-sample.jsf?skin=blueSky" rel="nofollow noreferrer">TabPanel - Show Case</a> the tab panels get messed up and become not usable (see image beelow).</li>
  </ul>
  
  <p>I don't need to forward to pages with RichFaces components, but it would be nice to have that option. Probably I have misunderstood something crucial on how to use RichFaces. </p>
  
  <p>Just for your information, I've created a totally new web project in NetBeans 7.0.1 and made two pages. Via a4j:commandLink I forward from the first page to the second one that have a Tab Panel. The rendering get messed up and the panel becomes unusable. Except including the libs and tags necessary for RichFaces, the new project is totally clean of setup parameter in the web.xml and rich-faces.xml.</p>
  
  <p><em>What am I missing when I forward to a page with RichFaces components?</em></p>
  
  <p>PS. If there is a patter to follow, that would help a lot on how to make page forwarding work with RichFaces.</p>
  
  <p>Greetings Chris. </p>
  
  <p>This is the error firebug reports (after the forward is invoked)</p>
  
  <pre><code>XML or text declaration not at start of entity
  http://localhost:8080/humis/faces/app_user/projectHome.xhtml
  Line 7
  </code></pre>
  
  <p>Firebug report these status for the page</p>
  
  <ul>
  <li>200 OK</li>
  <li>304 Not Modified</li>
  </ul>
  
  <p>It is something in the header and in the 20-30 scripts included. Don't know how to include the long html list here. The request it self seams ok, but RichFaces generated something that I can control when doing a forward to the page.</p>
  
  <p>The masterLayout file;</p>
  
  <pre><code>&lt;h:head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
  
      &lt;h:outputStylesheet name="css/default.css"/&gt;
      &lt;h:outputStylesheet name="css/cssLayout.css"/&gt;
  
      &lt;title&gt;
          &lt;h:outputText value="Partner Tapestry - " /&gt; &lt;ui:insert name="title"&gt;Browser Title&lt;/ui:insert&gt;
      &lt;/title&gt;
  &lt;/h:head&gt;
  
  &lt;h:body&gt;
      &lt;div id="top" &gt;
          &lt;ui:insert name="top"&gt;Top Default&lt;/ui:insert&gt;
      &lt;/div&gt;
  
      &lt;div id="messages"&gt;
          &lt;rich:messages id="messagePanel" ajaxRendered="true"/&gt;
      &lt;/div&gt;
  
      &lt;div id="content"&gt;
          &lt;ui:insert name="content"&gt;Content Default&lt;/ui:insert&gt;
      &lt;/div&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p></p>
  
  <p>File using the template</p>
  
  <pre><code>&lt;ui:composition template="/resources/masterLayout.xhtml" 
                  xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:ui="http://java.sun.com/jsf/facelets"
                  xmlns:h="http://java.sun.com/jsf/html"
                  xmlns:f="http://java.sun.com/jsf/core"
                  xmlns:rich="http://richfaces.org/rich"
                  xmlns:a4j="http://richfaces.org/a4j"&gt;
  
      &lt;ui:define name="title"&gt;
          &lt;h:outputText value="#{bundle.EditActivityTitle}"&gt;&lt;/h:outputText&gt;
      &lt;/ui:define&gt;
  
      &lt;ui:define name="top"&gt;
          &lt;ui:include src="#{userController.roleMenuPath}"/&gt;
      &lt;/ui:define&gt;
  
      &lt;ui:define name="content"&gt;
  
          &lt;rich:panel header="Edit Activity" styleClass="center_content"&gt;
              &lt;h:form id="activity_edit_form"&gt;
              ...
              &lt;/h:form&gt;
          &lt;/rich:panel&gt;
      &lt;/ui:define&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>I am using:</p>
  
  <ul>
  <li>RichFaces 4.0-final</li>
  <li>Glassfish 3.1.1</li>
  <li>I don't use maven and artefact for the library </li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/a7QbZ.png" alt="enter image description here"></p>