title: Difference between modelAttribute and commandName attributes in form tag in spring?
body: <p>In Spring 3, I have seen two different attribute in form tag in jsp</p>
  
  <pre><code>&lt;form:form method="post" modelAttribute="login"&gt;
  </code></pre>
  
  <p>in this the attribute modelAttribute  is the name of the form object whose properties are used to populate the form. And I used it in posting a form and in controller I have used <code>@ModelAttribute</code> to capture value, calling validator, applying business logic. Everything is fine here. Now</p>
  
  <pre><code>&lt;form:form method="post" commandName="login"&gt;
  </code></pre>
  
  <p>What is expected by this attribute, is it also a form object whose properties we are going to populate?</p>