You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Arun <ar...@gmail.com> on 2008/04/18 13:20:15 UTC

Struts2 Array of Elements

Hi,

I have a neat strust2 app with spring/hibernate and jsp.
I have set of array properties.
How do I populate to action.
I am using JSP/JSTL and no ognl or struts tags.
I have
<iput type="text" name=arr[0] />
<iput type="text" name=arr[1] />
<iput type="text" name=arr[2] />

And in action class I have
private String[] arr;
and getter and setters.

But it causes an error .
How could I populate it .
Is there any way I can do this?
I have searched mailing list and could not find any reply.


-- 
Thanks
Arun George

Re: Struts2 Array of Elements

Posted by Dave Newton <ne...@yahoo.com>.
--- Arun <ar...@gmail.com> wrote:
> I have
> <iput type="text" name=arr[0] />
> <iput type="text" name=arr[1] />
> <iput type="text" name=arr[2] />
> 
> And in action class I have
> private String[] arr;
> and getter and setters.
> 
> But it causes an error .

It might be helpful to be more specific.

Dave


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