Pq você não utiliza facelets???
http://today.java.net/pub/a/today/2006/08/29/developing-with-facelets-jsf-jsp.html
Pq você não utiliza facelets???
http://today.java.net/pub/a/today/2006/08/29/developing-with-facelets-jsf-jsp.html
Ola pessoal.
Estou desenvolvendo(ou tentando) um portal onde possui um layout com paginas jsp pra cada parte do layout ou seja,
uma pagina chamada head.jsp, conteudo.jsp e fooder.jsp
que montam o layout.
minha pagina index.jsp chama a pagina welcome.jsp onde soh tem o Bem vindo, q teria ser mostrada na parte do conteudo.
Mas quando rodo soh mostra o bem vindo e mais nada.
Meu tiles-defs.xml
<tiles-definitions>
<definition name="layout" path="/layout/layout.jsp">
<put name="title" value="Teste"/>
<put name="cabecalho" value="/comum/cabecalho.jsp"/>
<put name="rodape" value="/comum/rodape.jsp"/>
<put name="menu" value="/comum/menu.jsp"/>
</definition>
<definition extends="layout" name="/welcome.tiles">
<put name="conteudo" value="/pages/welcome.jsp"/>
</definition>
</tiles-definitions>
meu web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>portal</display-name>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<listener>
<listener-class>
com.sun.faces.config.ConfigureListener
</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>Tiles Servlet</servlet-name>
<servlet-class>
org.apache.struts.tiles.TilesServlet
</servlet-class>
<init-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/tiles-defs.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>
ahh aki esta o meu layout
<%@ taglib uri="/WEB-INF/tld/html_basic.tld" prefix="h"%>
<%@ taglib uri="/WEB-INF/tld/jsf_core.tld" prefix="f"%>
<%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles"%>
<html>
<head>
<title></title>
</head>
<body>
<f:view>
<h:form>
<table width="772" border="0">
<tr>
<td colspan="2" valign="top"><f:facet name="header">
<f:subview id="header">
<tiles:insert attribute="cabecalho" flush="false" />
</f:subview>
</f:facet></td>
</tr>
<tr>
<td width="116" align="left"><tiles:insert attribute="menu"
flush="false" /></td>
<td width="640" align="center"><tiles:insert
attribute="conteudo" flush="false" /></td>
</tr>
<tr>
<td colspan="2"><f:facet name="footer">
<f:subview id="footer">
<tiles:insert attribute="rodape" flush="false" />
</f:subview>
</f:facet></td>
</tr>
</table>
</h:form>
</f:view>
</body>
</html>
alguem poderia me ajudar?
grato!!!