title: How to populate multiple beans in a request using Spring @MVC
body: <p>I'm developing a project using Spring @MVC (with MVC annotations).</p>
  
  <p>If all request parameters shall be populated to a single bean everything seems fine, but what about multiple POJOs? </p>
  
  <p>I have searched the web and am aware of form-backing-objects, but how can I use them in @MVC (annotation-based)?</p>
  
  <p>Another question: shall I construct a bean for each form? Doesn't it just look like Strut's <code>ActionForm</code>s? Is there anyway to prevent creating these objects?</p>
  
  <p>Is there a way, to put all beans in a Map and ask Spring binder to populate them? Something like:</p>
  
  <pre><code>map.put("department", new Department());
  map.put("person", new Person());
  </code></pre>
  
  <p>so <code>department.name</code> and <code>department.id</code> bind into department bean, and <code>person.name</code>, <code>person.sex</code> and ... populate in the person bean? (So the controller method accepts a <code>Map</code> as its parameter).</p>