Linha de encoding sendo exibida após navegação

Pessoal, estou com o seguinte problema há algum tempo:

Montei um projeto usando JSF 2.1, facelets, Netbeans 7.3 e Primefaces 3.5

Tenho um template layout.xhtml que possue 3 regiões definidas e faz o include de arquivos para elas.

Aplico o layout numa tela de login usando

<ui:composition template="/template/layout.xhtml"> <ui:define name="corpo"> ... </ui:define> </ui:composition>

Caso o usuário seja validado com sucesso ele redireciona para uma outra página, via:

Está funcionando tudo certo, mas na página redirecionada aparece no topo da página: version="1.0" encoding="UTF-8"?> que é a primeira linha do template layout.xhtml

Já deixei o arquivo de destino "teste.xhtml" igual ao de origem ("login.xhtml") e o erro persistiu.

Alguém saberia me dar alguma dica do que pode estar causando isso?

Obrigado!

velhao coloca sua view teste.xhtml pra gente ver

Fiz alguns testes e tem haver com eu estar aplicando uma classe css no body do template.

Estou aplicando a classe: styleClass=“pagina” no body do layout, senão a aplico, não ocorre o problema.

O layout tem 3 partes, topo, corpo e rodapé

No index redefino a área “corpo” do layout e no botão:

disparo a ação para o arquivo teste.xhtml.

Seguem os arquivos…

[size=18]layout.xhtml[/size]

[code]<?xml version=“1.0” encoding=“UTF-8”?>
<!DOCTYPE html>
<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”>

&lt;h:head&gt;&lt;title&gt;Teste&lt;/title&gt;&lt;/h:head&gt;

&lt;h:outputStylesheet library="css" name="style.css"  /&gt;
&lt;h:body styleClass="pagina"&gt;  
    &lt;p:panelGrid&gt;  
        &lt;p:row &gt;
            &lt;p:column colspan="3" &gt;
                &lt;ui:insert name="cabecalho" &gt;
                    &lt;ui:include src="/template/topo.xhtml" /&gt;
                &lt;/ui:insert&gt;
            &lt;/p:column&gt;
        &lt;/p:row&gt;

        &lt;p:row&gt;
            &lt;p:column width="22%" /&gt;
            &lt;p:column width="56%"&gt; 
                &lt;ui:insert name="corpo" &gt;
                    &lt;ui:include src="/template/corpo.xhtml" /&gt;
                &lt;/ui:insert&gt;
            &lt;/p:column&gt;
            &lt;p:column width="22%" /&gt;
        &lt;/p:row&gt;

        &lt;p:row&gt;
            &lt;p:column colspan="3" &gt;
                &lt;ui:insert name="rodape" &gt;
                    &lt;ui:include src="/template/rodape.xhtml" /&gt;
                &lt;/ui:insert&gt;
            &lt;/p:column&gt;
        &lt;/p:row&gt;
    &lt;/p:panelGrid&gt;
&lt;/h:body&gt;

</html>
[/code]

[size=18]style.css[/size]

[code]body.pagina{
background-color:cadetblue;
}

table.pagina{
horizontal-align: center;
}

fundo{
background-color: cadetblue;
}[/code]

[size=18]topo.xhtml[/size]

&lt;ui:fragment 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"&gt; &lt;h:form&gt; &lt;h:graphicImage value="/resources/images/Applied_Mathematics.jpg"/&gt; &lt;/h:form&gt; &lt;/ui:fragment&gt;

[size=18]rodape.xhtml[/size]

&lt;ui:fragment 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"&gt; &lt;h:form&gt; &lt;h:commandLink action="fornecedores"/&gt; &lt;/h:form&gt; &lt;/ui:fragment&gt;

[size=18]index.xhtml[/size]

[code]<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”>
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
<ui:composition template=”/template/layout.xhtml”>
<ui:define name=“corpo”>
<h:form id=“form” >
<div align=“center” >

                    &lt;table style="height: 700px" width="100%"&gt;
                        &lt;tr valign="middle" align="center"&gt;
                            &lt;td&gt;
                                &lt;p:panel id="panel" style="width: 650px;"&gt;
                                    &lt;p:row&gt;
                                        &lt;p:column&gt;
                                            &lt;p:messages id="msgs"/&gt;
                                        &lt;/p:column&gt;
                                    &lt;/p:row&gt;

                                    &lt;p:panelGrid id="panelGrid" style="width: 534px;"&gt;

                                        &lt;f:facet name="header"&gt;
                                            &lt;p:row&gt;
                                                &lt;p:column colspan="2"&gt;Login&lt;/p:column&gt;
                                            &lt;/p:row&gt;
                                        &lt;/f:facet&gt;
                                        &lt;p:row&gt;
                                            &lt;p:column&gt;
                                                &lt;h:outputLabel for="usuario" value="#{msg.loginUsuario}" /&gt;  
                                            &lt;/p:column&gt;
                                            &lt;p:column&gt;
                                                &lt;p:inputText id="usuario" label="#{msg.loginUsuario}" value="#{loginMB.usuario}" required="true" maxlength="8" size="10"&gt;
                                                    &lt;f:validateLength minimum="2" /&gt; 
                                                &lt;/p:inputText&gt;
                                            &lt;/p:column&gt;
                                        &lt;/p:row&gt;
                                        &lt;p:row&gt;
                                            &lt;p:column&gt;
                                                &lt;h:outputLabel for="senha" value="#{msg.loginPass}"/&gt;
                                            &lt;/p:column&gt;
                                            &lt;p:column&gt;
                                                &lt;p:password id="senha" label="#{msg.loginPass}" value="#{loginMB.senha}" required="true" maxlength="8" size="10"&gt;
                                                    &lt;f:validateLength minimum="2" /&gt; 
                                                &lt;/p:password&gt;
                                            &lt;/p:column&gt;
                                        &lt;/p:row&gt;

                                        &lt;f:facet name="footer"&gt;  
                                            &lt;p:row&gt;
                                                &lt;p:column id="colunas" colspan="2" style="alignment-baseline: middle;  " &gt;
                                                    &lt;p:commandButton type="submit" value="#{msg.botaoEntrar}" action="teste" update="panel" icon="ui-icon-person" /&gt;  
                                                &lt;/p:column&gt;
                                            &lt;/p:row&gt;
                                        &lt;/f:facet&gt;

                                    &lt;/p:panelGrid&gt; 
                                &lt;/p:panel&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                &lt;/div&gt;            
            &lt;/h:form&gt;
        &lt;/ui:define&gt;
    &lt;/ui:composition&gt;
&lt;/h:body&gt;

</html>[/code]

[size=18]teste.xhtml[/size]

[code]<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”>
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
<ui:composition template=”/template/layout.xhtml”>
<ui:define name=“corpo”>
<h:form id=“form” >
<div align=“center” >

                    &lt;table style="height: 700px" width="100%"&gt;
                        &lt;tr valign="middle" align="center"&gt;
                            &lt;td&gt;
                                Teste
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                &lt;/div&gt;            
            &lt;/h:form&gt;
        &lt;/ui:define&gt;
    &lt;/ui:composition&gt;
&lt;/h:body&gt;

</html>[/code]

Alguma sugestão do que pode ser esse problema?

Valeu!