title: How to bind a List for ModelAttribute in spring mvc3
body: <p>User.java</p>
  
  <pre><code>public class User{
         private String name;
         private List&lt;Link&gt; links;
  }
  </code></pre>
  
  <p>Link.java</p>
  
  <pre><code>public class Link{
         private String addr;
         private String tel;
  
  }
  </code></pre>
  
  <p>UserController.java</p>
  
  <pre><code>@RequestMapping(value = "user", method = RequestMethod.GET)
  public String test(Model model) {
          model.addAttribute("user",new User());
          return "user";
  
  }
  
  @RequestMapping(value = "user", method = RequestMethod.POST)
  public String test(User user) {
          System.out.println(user.getName());
          List&lt;Link&gt; links = user.getLinks();
          for(Link link:links){
              System.out.println(link.getAddr());
              System.out.println(link.getTel());
          }
  
          return "user";
  }
  </code></pre>
  
  <p>user.jsp</p>
  
  <pre><code>[form:form modelAttribute="user" method="post" action="/user"]
  [form:input path="name" /]
  [form:input path="addr" /]
  [form:input path="tel" /]
  [form:input path="addr" /]
  [form:input path="tel" /]
  [input type="submit"][/input]
  [/form:form]
  </code></pre>
  
  <p>Who can tell me How to do it!</p>