Using S2 2.3.16.3

My action wants to take an array of parameters, if they are passed like
arr=1&arr=2&arr=3 then everything works fine.

But by default JQuery encodes arrays as URL parameters like
arr[]=1&arr[]=2&arr[]=3,
the parameters get named "arr[]" instead of "arr".

My action has a setter like:

public void setArr(String[] arr)

This isn't matching the parameter "arr[]" so the setter never gets called.

Is there a way to have Struts recognize that parameters "arr[]" is the same
as array "arr"?

If not, how do I construct a setting that will accept parameters named
"arr[]"?


Greg

P.S. I know how to force jQuery to encode the "traditional" way but would
be nice it just worked.

Reply via email to