Seguinte, estou criando um projeto utilizando o MYFACES, mas não estou conseguindo renderizar a pagina utilizando o <ui:composition template="/template.faces">,
tenho uma pagina ‘home.jsp’ que chama o template.jsp e não renderiza, unica coisa que aparece é o texto que eu coloco no home.jsp, mas a estrutura que criei
no template não é exibido.
Alguém pode me ajudar por favor?
Obrigado!
Abaixo segue a estrutura:
-----------------------------------------------------------------template.jsp:
<?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:jsp="http://java.sun.com/JSP/Page"
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:t="http://myfaces.apache.org/tomahawk">
<head>
<title>Titulo</title>
<meta name="Author" content="Alex" />
</head>
<body>
<div id="tudo">
<div id="header">
<table cellspacing="0" border="1" cellpadding="0"
style="height: 10px; width: 100%;">
<tr>
<td>
<table cellspacing="0" border="0">
<tr>
<td width="20px" rowspan="3" />
</tr>
<tr>
<td height="8px" />
</tr>
<tr>
<td>Logo</td>
</tr>
<tr>
<td height="3px"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id="conteudo">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" width="223px">
<div id="menu">Menu</div>
</td>
<td valign="top">
<div id="main"><ui:insert name="body">Conteudo</ui:insert></div>
</td>
</tr>
</table>
</div>
<div id="rodape">
<table width="100%" cellspacing="0" border="0" cellpadding="0"
style="height: 25px">
<tr valign="middle">
<td align="center">
<table width="99%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left" style="color: white">xxxx</td>
<td align="right" style="color: white"><b>Usuário:</b></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>
-----------------------------------------------------------------home.jsp:
<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns:jsp="http://java.sun.com/JSP/Page"
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:t="http://myfaces.apache.org/tomahawk"
template="/template.jsp">
<ui:define name="body">
<h1>xxx</h1>
</ui:define>
</ui:composition>
-----------------------------------------------------------------web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>sipcs</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.faces</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
</web-app>
-----------------------------------------------------------------Faces-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<application>
<locale-config>
<default-locale>pt_BR</default-locale>
</locale-config>
</application>
</faces-config>
-----------------------------------------------------------------LIBS: