Problema com Primefaces e Master Page

boa noite galera, estou tendo dificuldade para criar uma master page no jsf 2.0 + primefaces

a pagina index.xhtml é minha master page(template)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"  
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>

    </h:head>
    <h:body>
        <p:layout fullPage="true">
            <p:layoutUnit position="top" height="120" style="background-color: Red;">
                 <ui:insert name="top"></ui:insert>
            </p:layoutUnit>
            <p:layoutUnit position="left" width="120" style="background-color: Green;">
                <ui:insert name="left"></ui:insert>
            </p:layoutUnit>
            <p:layoutUnit position="center" style="background-color: Blue;">
                <ui:insert name="center"></ui:insert>
            </p:layoutUnit>
        </p:layout>
    </h:body>
</html>

quando vou chamar a minha master page, em outra pagina nao consigo, a pagina que vai receber meu padrão da master page
pagina2.xhtml

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <ui:composition template="/index.xhtml">
        <ui:define name="top">kkkk</ui:define>
        <ui:define name="left">wwwww</ui:define>
        <ui:define name="center">ooooo</ui:define>
    </ui:composition>
</html>

se alguem puder me ajudar, agradeço

gente peço desculpa é que eu atualizei a pagina e abriu mais dois post

O que acontece ao realizar a chamada? Algum erro ou simplesmente não aparece nada?
Eu abri em meu blog um post sobre facelets e template, dê uma olhada e veja se te ajuda em algo.
Poste o resultado da chamada no pagina2.xhtml

andré eu verifiquei o conteudo no seu blog la, muito massa, abriu muito o meu entendimento sobre facelets e template, tenho uma outra duvida como que eu vou criar o meu CSS, pra mim chamar na minha master page, obrigado

Substitui isso:

&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:h="http://java.sun.com/jsf/html"  
          xmlns:ui="http://java.sun.com/jsf/facelets"&gt;  
      
        &lt;ui:composition template="/index.xhtml"&gt;  
            &lt;ui:define name="top"&gt;kkkk&lt;/ui:define&gt;  
            &lt;ui:define name="left"&gt;wwwww&lt;/ui:define&gt;  
            &lt;ui:define name="center"&gt;ooooo&lt;/ui:define&gt;  
        &lt;/ui:composition&gt;  
    &lt;/html&gt;  

Por isso:

&lt;ui:composition template="/index.xhtml" xmlns="http://www.w3.org/1999/xhtml"  
          xmlns:h="http://java.sun.com/jsf/html"  
          xmlns:ui="http://java.sun.com/jsf/facelets"&gt;  
    &lt;ui:define name="top"&gt;kkkk&lt;/ui:define&gt;  
    &lt;ui:define name="left"&gt;wwwww&lt;/ui:define&gt;  
    &lt;ui:define name="center"&gt;ooooo&lt;/ui:define&gt;  
&lt;/ui:composition&gt;

Não precisa declarar nada de HTML, visto que já foi declarado no template, mas o ‘compositon’ deve chamar as taglibs.

ei fernando fiz do jeito que vc me informou e deu esse erro

[quote=lineofgol]ei fernando fiz do jeito que vc me informou e deu esse erro

[quote]
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<ui:composition xmlns=“http://www.w3.org/1999/xhtml” xmlns:h=“http://java.sun.com/jsf/html” xmlns:p=“http://primefaces.prime.com.tr/ui” xmlns:ui=“http://java.sun.com/jsf/facelets” template=“index.xhtml”>
<ui:define name=“top”>kkkk</ui:define>
<ui:define name=“left”>wwwww</ui:define>
<ui:define name=“center”>ooooo</ui:define>
</ui:composition>
[/quote][/quote]

Que estranho… substitui esses ‘kkkk’, ‘wwwwww’, etc. por elementos de html.

mesma coisa

consegui resolver o problema, tinha que modificar o web.xml

retirei o /faces/* por *.xhtml e faces/index.xhtml por index.xhtml

Ah, ta. Estava muito estranho esse erro mesmo…

configurei e deu certo