Alguem poderia me ajudar por favor....assunto relativo a apostila fj-21

Fiz tudo certinho, mas o retorno http://localhost:8080/struts/listaContatos.do, esta a pagina em branco!!!

tB ABRE A PAGINA MAS NAO RETORNA NADA!
http://localhost:8080/struts/listaContatos.do

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import br.com.jdbc.modelo.*;

import java.util.ArrayList;
import java.util.List;

public class ListaContatosAction extends Action{

    public ActionForward execute(ActionMapping mapping, ActionForm form,
                    HttpServletRequest request, HttpServletRequest response)
                               throws Exception {
            
            List<Contato> lista = new ContatoDAO().getLista();
            request.setAttribute("contatos", lista);
            
            return mapping.findForward("lista");

}

}

<%@ page language=“java” contentType=“text/html; charset=UTF-8”
pageEncoding=“UTF-8”%>

<%@ taglib uri=“http://java.sun.com/jsp/jstl/core” prefix=“c” %>

Insert title here ${contato.id} - ${contato.nome}
------------------------------------------------------------------------------------------------------ <?xml version="1.0" encoding="UTF-8"?>
             <action-mappings>
                        <action path="/listaContatos"

type=“br.com.struts.action.ListaContatosAction”>

             </action-mappings>

<?xml version="1.0" encoding="UTF-8"?> testeDeStruts

org.apache.struts.action.ActionServlet
1

testeDeStruts *.do

ERRO

01/02/2010 09:42:14 org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property ‘source’ to ‘org.eclipse.jst.j2ee.server:ProjectCCE’ did not
find a matching property.
01/02/2010 09:42:14 org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property ‘source’ to ‘org.eclipse.jst.jee.server:struts’ did not find a
matching property.
01/02/2010 09:42:14 org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property ‘source’ to ‘org.eclipse.jst.jee.server:StrutsAcademic’ did not
find a matching property.
01/02/2010 09:42:14 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path: /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.15/jre/…/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386:/usr/lib/xulrunner-addons:/usr/lib/xulrunner-addons:/usr/java/packages/lib/i386:/lib:/usr/lib
01/02/2010 09:42:14 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
01/02/2010 09:42:15 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 624 ms
01/02/2010 09:42:15 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
01/02/2010 09:42:15 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
01/02/2010 09:42:15 org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(/home/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/struts/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
01/02/2010 09:42:16 org.apache.struts.action.ActionServlet initChain
INFO: Loading chain catalog from
jar:file:/home/tomcat/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml
01/02/2010 09:42:16 org.apache.struts.action.ActionServlet initChain
INFO: Loading chain catalog from
jar:file:/home/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/struts/WEB-INF/lib/struts-core-1.3.10.jar!/org/apache/struts/chain/chain-config.xml
01/02/2010 09:42:18 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
01/02/2010 09:42:18 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
01/02/2010 09:42:18 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/35 config=null
01/02/2010 09:42:18 org.apache.catalina.startup.Catalina start
INFO: Server startup in 3445 ms
01/02/2010 09:42:56 org.apache.struts.chain.ComposableRequestProcessor
init
INFO: Initializing composable request processor for module prefix ‘’
01/02/2010 09:42:56
org.apache.struts.chain.commands.servlet.CreateAction createAction
INFO: Initialize action of type:
br.com.struts.action.ListaContatosAction

Opa cara, da uma olhadinha no metodo execute da action se o parametro está HttpServletRequest ou se esta ServletRequest, tem que estar HttpServletRequest . Geralmente o erro é por causa disso.

vlw

Brigadao, o erro estava no execute,public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletRequest response)

valeu vou prosseguir a apostila;;;

Uma apostila legal também para vc pegar uma boa base de Struts depois de estudar esta é a:
www.guj.com.br/posts/downloadAttach/3340.java

Bom estudo :smiley:

brigadão bem legal mesmo........     ce tem algo de jsf ..estou estudando para um concurso e vai cair..........

Cara de JSF nao tenho nada somente um livro mesmo, depois do struts eu cansei de configurar xml agora so quero annotations