www.abcd.com/user/getuserstats.htm?userId=123123
In this API, the userId
gets set to a field named userId
in the Action
class mapped to this action.
Now, for this
www.abcd.com/user/getuserstats.htm?listOfUsers=123123,456456,789789,42568,58963
I need to know, how can we map this list of userId
s in an ArrayList
defined in the corresponding Action
class, so that it gets mapped as an ArrayList
not as a String
.
Note: I don't want to get a string of userId
s and convert it to ArrayList
later. I want that the list of the userId
s be automatically mapped into a list or an ArrayList
. I am sure, there must be a way to achive this.
basically , i found that it can be achieved like this :
www.abcd.com/user/getuserstats.htm?userId=123123&userId=4578&userId=567&userid=987
these params will go into an arraylist already declared in the action class.