Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/07/2004, 11:25
milsoncardona
 
Fecha de Ingreso: septiembre-2003
Mensajes: 47
Antigüedad: 21 años, 6 meses
Puntos: 0
Ayuda con Struts

Hola Amigos

Tengo el siguiente problema, estoy tratando de mostrar una consulta a la DB en una pagina JSP con el TAG ITERATE, creo que tengo todo definido en el STRUTS-CONFIG, creé un Action, un Form y la JSP.

pero al momento de cargar la JSP en mi aplicación, me dispara el siguiente error:

org.apache.jasper.JasperException: No collection found
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:241) .....


mi JSP es:

<html:form action="/listadoFormatos.do" name="listadoFormatosForm" type="co.edu.uco.forms.ListadoFormatosForm">
<logic:iterate id="miFila" name="listadoFormatosForm" property="listaFormatos">
<tr>
<td><bean:write name="miFila" property="descripcion"/></td>
<td><bean:write name="miFila" property="formato"/></td>
<td><bean:write name="miFila" property="paginaWeb"/></td>
</tr>
</logic:iterate>
--------------------------------------------------------------------------

mi FORM es:

public class ListadoFormatosForm extends ActionForm{

//-------------------- Instance Variables
private String action = "Create";
public Collection listaFormatos = null;

//--------------------- Properties

public String getAction() {
return (this.action);
}

public void setAction(String action) {
this.action = action;
}

public Collection getListaFormatos(){
return (this.listaFormatos);
}

public void setListaFormatos(Collection collection){
System.out.println("paso FORM");
this.listaFormatos = collection;
}

public void reset(ActionMapping mapping, HttpServletRequest request) {
this.action = "Create";
this.listaFormatos = null;
}
}

--------------------------------------------------------------------------

mi ACTION es:

public class ListadoFormatosAction extends Action{
public ActionForward execute(ActionMapping mapping,
ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) throws java.lang.Exception{

Collection listaFormatosCollection = new ArrayList();
ListadoFormatosForm listadoFormatosForm = null;
..........

listadoFormatosForm.setListaFormatos(listaFormatos Collection);

}
--------------------------------------------------------------------------

mi STRUT-CONFIG es:

<form-beans>
<form-bean name="listadoFormatosForm" type="co.edu.uco.forms.ListadoFormatosForm"/>
</form-beans>

</action-mappings>
<action name="listadoFormatosForm" path="/listadoFormatos" scope="request"
type="co.edu.uco.action.ListadoFormatosAction">
<forward name="bien" path="/jsp/login.jsp" redirect="false" />
<forward name="mal" path="/jsp/error.jsp" redirect="false" />
</action>
</action-mappings>
--------------------------------------------------------------------------

Gracias por adelantado

Milson