Thanks for your info! Do you think the following will work?
<logic:iterate id="regList" name="RegForm" property="listVector">
<bean:write name="regList" property="listVector"/>
</logic:iterate>
private Vector listVector;
public VectorString[] getListVector()
{
return listVector;
}
Thank you again!
---------------------------------------------------------------------------
Henry Lu
MCIT phone: (734) 936-2063
University of Michigan Medical Center fax: (734) 763-4372
On Tue, 12 Feb 2002, Moritz Petersen wrote:
> Henry,
>
> an array does not extend java.util.Collection. The iterate tag expects a
> Collection (which contains a 'iterator()' method). So you have to convert
> the array into a collection, either by simply not using arrays in favor of
> collections, or by implementing an additional method like:
>
> public Collection getListCollection()
> {
> return Arrays.asList(listArray);
> }
>
> BTW: I would avoid arrays.
>
> Cheers,
> Moritz.
>
> > I have a jsp page with the following code:
> >
> > <logic:iterate id="regList" name="RegForm" property="listArray">
> > <bean:write name="regList" property="listArray"/>
> > </logic:iterate>
> >
> > and in the RegForm.java java bean, we have the following code:
> >
> > private String[] listArray;
> >
> > public String[] getListArray()
> > {
> > return listArray;
> > }
> >
> > But when I query the page, I got error:
> > javax.servlet.ServletException: No collection found
> >
> > Why and how to fix?
> >
> >
> >
> > ------------------------------------------------------------------
> > ---------
> > Henry Lu
> > MCIT phone: (734) 936-2063
> > University of Michigan Medical Center fax: (734) 763-4372
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>