jquery get arraylist data in action
<p>I am trying to use jquery to get arraylist from action. And then get data from per row of that arraylist.
My code like below:</p>

<p><strong>My Controller Action (UserAction.java):</strong></p>

<pre><code>public class UserAction  extends ActionSupport {

private ArrayList&lt;UserVO&gt; listUsers;
public ArrayList&lt;UserVO&gt; getListUsers() {
    return listUsers;
}
public void setListUsers(ArrayList&lt;UserVO&gt; listUsers) {
    this.listUsers = listUsers;
}

public String execute(){

    listUsers = new ArrayList&lt;UserVO&gt;;
    UserVO bean = new UserVO();
    bean.setUserName("john");
    bean.setLastName("mit");
    listUsers.add(bean);

    bean = new UserVO();
    bean.setUserName("Madam");
    bean.setLastName("Git");
    listUsers.add(bean);

    return SUCCESS;
}
}
</code></pre>

<p><strong>And UserVO</strong></p>

<pre><code>    public class UserVO  {
         private String userName;
         private Strnig lastName;

         //get, set methods 
             ....
    }
</code></pre>

<p><strong>And my jsp:</strong></p>

<pre><code>user.jsp
      &lt;script type="text/javascript"&gt;
         jQuery(document).ready(function($){

            var objlistUsers = '${listUsers}';  //get all list from action
            for (var i = 0; i &lt; 2; i++) {
                 var aUser = "objlistUsers[test]";

                 var aaa = aUser.replace("test", i);

                 aaa = '${'+aaa+'}';  ///My purpose: I want to get data per row: ${listUsers[i]}            
                 alert(aaa);  //but can not return exactly
          }

        });

      &lt;/script&gt;
</code></pre>

<p>I want to get data of per row in list, like:  <code>${listUsers[i]}</code>
 How I can get it?</p>

<p>Thank you!</p>
