title: Submit form without refreshing page in spring mvc
body: <p>I have a listbox2 that's filled according to what has been selected in the listbox1. So when i submit the form, i lose the data of listbox2 and i have to reselect in the listbox1 again.
  How can i keep data in listbox2 after submitting ?</p>
  
  <pre><code>&lt;form:form action="choseElement" method="post"&gt; 
  &lt;select name="listbox1"&gt;
   &lt;j:forEach items="${elementList}" var="elem"&gt;
     &lt;option&gt;${elem.name}&lt;/option&gt;
   &lt;/j:forEach&gt;
  &lt;/select&gt;
  &lt;/form:form&gt;
  &lt;form:form action="addProduct" method="post"&gt; 
   &lt;input type="text" name="nameProd"&gt;
   &lt;select name="listbox2"&gt;
   &lt;j:forEach items="${LPbyElement}" var="lp"&gt;
     &lt;option&gt;${lp.name}&lt;/option&gt;
   &lt;/j:forEach&gt;
   &lt;/select&gt;
  &lt;/form:form&gt;
  </code></pre>