title: <form:form modelAttribute .. using two beans in JSP
body: <p>This is a spring based application. My form definition in JSP is as below,</p>
  
  <pre><code>&lt;form:form modelAttribute="article" enctype="multipart/form-data" method="POST"
             action="${sendEmailUrl}" name="postAd" id="postAd"&gt;
  </code></pre>
  
  <p>I want to display some data from 'article' bean on my form so I've defined <code>modelAttribute='article'</code>. Till here it is all fine. But on submit of the form, I want to collect data in different bean than article. Since I can define modelAttribute only once in the form, can someone please advise how can I use two beans in JSP?</p>
  
  <p>P.S. In case I am not clear, let me give more details. On submit of form, data entered by user will be collected in bean 'X' and email will be sent using java email. But bean 'Y' (article in this case) is holding some values which needs to be displayed on the form.</p>
  
  <p>Hope I am clear.</p>