Erro no acesso a action

1 resposta
F

Galera da um help por favor,

estou obtendo a seguinte mensagem ao tentar acessar um serviço java:
type Status report

message No action instance for path /resumoFabrica could be created

description The server encountered an internal error (No action instance for path /resumoFabrica could be created) that prevented it from fulfilling this request.

esse eh meu struts-config.xml
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
<struts-config>
   <form-beans>
		<form-bean name="ControleComponenteForm" type="br.com.foursys.controlecomp.form"/>
   </form-beans>


   <action-mappings>
   <!-- Inicio Controle de Componentes -->
       	<action path="/resumoFabrica" 
    			type="br.com.foursys.controlecomp.action.ControleComponenteAction"
    			name="ControleComponenteForm"
			    scope="request"
			    validate="false" 
			    parameter="method">
       	 	<forward name="sucesso" path="prg_ResumoFabrica.jsp"/>
	   	</action>	   	  	
   <!-- Fim Controle de Componentes -->   
   </action-mappings>
   
   <controller locale="false" inputForward="true" processorClass="org.apache.struts.action.RequestProcessor" contentType="text/html" /> 
   <!-- message-resources parameter="com.sgc.resource.ApplicationResources" null="false"/-->
   
</struts-config>
esse minha action
package br.com.foursys.controlecomp.action;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

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

import br.com.foursys.action.BasicAction;
import br.com.foursys.controlecomp.form.ResumoFabricaForm;
import br.com.foursys.types.Cliente;

public class ResumoFabricaAction extends BasicAction{
	
	
	public ActionForward start( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws Exception {
		ResumoFabricaForm resumoFabricaForm = (ResumoFabricaForm) form;
		
		List<Cliente> list = new ArrayList<Cliente>();
		
		Cliente cliente = new Cliente();
		cliente.setCodigo(1);
		cliente.setDescricao("Citibank");
		list.add(cliente);
		Cliente cliente2 = new Cliente();
		cliente2.setCodigo(1);
		cliente2.setDescricao("Teste");
		list.add(cliente2);
		
		resumoFabricaForm.setListaClientes(list);
		
		
		return mapping.findForward("sucesso");
	}

}
esse meu form
package br.com.foursys.controlecomp.form;

import java.util.List;


import org.apache.struts.action.ActionForm;

import br.com.foursys.types.Cliente;

public class ResumoFabricaForm extends ActionForm{

	/**
	 * 
	 */
	private static final long serialVersionUID = -52992981715134907L;
	
	private List<Cliente> listaClientes;

	/**
	 * @return the listaClientes
	 */
	public List<Cliente> getListaClientes() {
		return listaClientes;
	}

	/**
	 * @param listaClientes the listaClientes to set
	 */
	public void setListaClientes(List<Cliente> listaClientes) {
		this.listaClientes = listaClientes;
	}

}
esse é o tal de BasicAction ai
package br.com.foursys.action;

import org.apache.struts.actions.DispatchAction;


 
public abstract class BasicAction extends DispatchAction {

}
e esse o web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app 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/web-app_2_4.xsd"
	version="2.4">
	<display-name>I4SYS</display-name>
	<description>Intranet Foursys</description>
	
	<servlet>
		<servlet-name>action</servlet-name>
		<description>struts servlet</description>
		<servlet-class>
			org.apache.struts.action.ActionServlet
		</servlet-class>
		<init-param>
			<param-name>config</param-name>
			<param-value>
				/WEB-INF/struts-config.xml
			</param-value>
			<description>general module</description>
		</init-param>
		<init-param>
			<param-name>locale</param-name>
			<param-value>false</param-value>
		</init-param>
		<init-param>
			<param-name>debug</param-name>
			<param-value>2</param-value>
		</init-param>
		<init-param>
			<param-name>detail</param-name>
			<param-value>2</param-value>
		</init-param>
		<init-param>
			<param-name>convertNull</param-name>
			<param-value>true</param-value>
		</init-param>
		<load-on-startup>2</load-on-startup>
	</servlet>
	
	<!-- Standard Action Servlet Mapping -->
	<servlet-mapping>
		<servlet-name>action</servlet-name>
		<url-pattern>*.do</url-pattern>
	</servlet-mapping>
	
	<session-config>
		<session-timeout>30</session-timeout>
	</session-config>

	<!-- The Usual Welcome File List -->
	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>


	<jsp-config>
		<taglib>
			<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
			<taglib-location>
				/WEB-INF/tlds/struts-bean.tld
			</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
			<taglib-location>
				/WEB-INF/tlds/struts-html.tld
			</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
			<taglib-location>
				/WEB-INF/tlds/struts-logic.tld
			</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
			<taglib-location>
				/WEB-INF/tlds/struts-nested.tld
			</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
			<taglib-location>
				/WEB-INF/tlds/struts-tiles.tld
			</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>/WEB-INF/taglibs-unstandard.tld</taglib-uri>
			<taglib-location>
				/WEB-INF/tlds/taglibs-unstandard.tld
			</taglib-location>
		</taglib>
	</jsp-config>

</web-app>

ja conferi e as classes estao sendo geradas em WEB-INF/classes

alguem sabe oq falta?

1 Resposta

alves.Felipe

ola…

<action path="/resumoFabrica"   
            type="br.com.foursys.controlecomp.action.ControleComponenteAction"   
            name="ControleComponenteForm"   
            scope="request"   
            validate="false"   
            parameter="method">   
        <forward name="sucesso" path="prg_ResumoFabrica.jsp"/>   
    </action> </blockquote>

No seu type não teria que estar direcionando para o ResumoFabricaAction?

Criado 3 de junho de 2008
Ultima resposta 3 de jun. de 2008
Respostas 1
Participantes 2