You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "SanJ.SANJAY" <gi...@gmail.com> on 2008/11/07 18:12:10 UTC

Struts logic:iterate does not recognize the collection.

 I am trying to display the collection that I am setting in struts action to
the request scope.
 But when I try to use struts <logic:iterate> to display the collection,
 it says does not find xxxCollection bean in any scope.

In Action class:
 for (int i = 0; i < children.length; i++) 
{ xxxCollection.add(filename); } 
request.getSession().setAttribute("xxxCollection", xxxCollection);

I have getter and setters for this collection in the form.

 But In JSP, it does not recognize the collection: 

<logic:iterate id="iprecord" indexId="ind" name="xxxCollection" >
 <bean:write name="iprecord" property="xxxCollection" /> 
</logic:iterate>

I am clueless about why the bean is invisible??
-- 
View this message in context: http://www.nabble.com/Struts-logic%3Aiterate-does-not-recognize-the-collection.-tp20384792p20384792.html
Sent from the Struts - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Struts logic:iterate does not recognize the collection.

Posted by Dave Newton <ne...@yahoo.com>.
Please ask this question on the struts-user list; struts-dev is for the development of Struts itself.

Thanks,
Dave

--- On Fri, 11/7/08, SanJ.SANJAY wrote:
> I am trying to display the collection that I am setting in
> struts action to the request scope.
>  But when I try to use struts <logic:iterate> to
> display the collection,
>  it says does not find xxxCollection bean in any scope.
> 
> In Action class:
>  for (int i = 0; i < children.length; i++) 
> { xxxCollection.add(filename); } 
> request.getSession().setAttribute("xxxCollection",
> xxxCollection);
> 
> I have getter and setters for this collection in the form.
> 
>  But In JSP, it does not recognize the collection: 
> 
> <logic:iterate id="iprecord"
> indexId="ind" name="xxxCollection" >
>  <bean:write name="iprecord"
> property="xxxCollection" /> 
> </logic:iterate>
> 
> I am clueless about why the bean is invisible??
> -- 
> View this message in context:
> http://www.nabble.com/Struts-logic%3Aiterate-does-not-recognize-the-collection.-tp20384792p20384792.html
> Sent from the Struts - Dev mailing list archive at
> Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org