Boa noite amigos,
Estou tentando usar tiles do struts, mas não funfa, a pagina fica em branco… Vou explicar como estou fazendo…
Tenho a pagina “gabarito_index.jsp”:
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ page contentType="text/html;charset=ISO-8859-1" %>
<html>
<body>
<table>
<tr valign='top'>
<td>
<table>
<tr>
<td>
<tiles:insert attribute='login'/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
A pagina “login.jsp”:
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ page contentType="text/html;charset=ISO-8859-1" %>
<CENTER>
<FORM ACTION="valida.do" METHOD="POST">
<table width="30%" bgcolor="#EFF1F7" >
<tr align="center" >
<td width="10%" align="right" >Login: </td>
<td width="20%" colspan="3" ><div align="left">
<input type="text" name="login" value="" size="20">
</div></td>
</tr>
<tr align="center" >
<td width="10%" align="right" >Password: </td>
<td width="20%" colspan="3" ><div align="left">
<input type="password" name="senha" value="" size="20">
</div></td>
</tr>
</table>
<h3><bean:message key="label.nota"/></h3>
<INPUT TYPE="SUBMIT" class="botao" VALUE="enviar">
</FORM>
<html:errors/>
</CENTER>
A pagina “index.jsp”:
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ page contentType="text/html;charset=ISO-8859-1" %>
<tiles:insert page="/gabarito_login.jsp" flush="true">
<tiles:put name="login" value="/login.jsp"/>
</tiles:insert>
Fragmento do web.xml, que é a pagina inicial quando digito http://localhost:8080/sce
<welcome-file-list>
<welcome-file>/web/jsp/layout/index.jsp</welcome-file>
</welcome-file-list>
Não está apresentando nenhum erro, na pagina em branco que aparece, clico com o bt direito e depois em “Exibir código fonte” e verifico que é a pagina que setei no web.xml, mas não está aparecendo a pagina login.jsp… O que pode está errado?
É a pagina index.jsp que devo setar no web.xml?
Obrigado…
Vlw…