title: Convert Spring MVC <form:select> to HTML <select> with JSTL <c:forEach>
body: <p>I am sending an ArrayList to this jsp file and reading it with this code:</p>
  
  <pre><code>&lt;form:select path="student.ec[0].estate"&gt;
      &lt;form:option value="NONE" label="--- Select one ---" /&gt;
      &lt;form:options items="${estate}" /&gt;
  &lt;/form:select&gt;
  </code></pre>
  
  <p>Because I have <strong>path</strong> attribute in the above html, it stores the selected value in an appropriate bean. And I can also easily print it. But I want the above code to be converted to JSTL code. I want to be able to write the above code with c:ForEach tags. 
  So far, I have only been able to show the dropdown menu. But it doesn't save the value selected in its appropriate bean. This is the code I got:</p>
  
  <pre><code>&lt;select&gt;
      &lt;c:forEach var="line" items="${availableLines}"&gt;
          &lt;option&gt;&lt;c:out value="${line}"/&gt;&lt;/option&gt;
      &lt;/c:forEach&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I will appreciate any help. Thanks</p>
  
  <p>Solution! Found it. Here is the code: </p>
  
  <pre><code>&lt;form:select path="state" id="state"&gt; 
  &lt;form:option value="NONE"&gt;Select   State: &lt;/form:option&gt; 
  &lt;c:forEach items="${estateList}" var="stateslist"&gt; 
  &lt;form:option value="${stateslist}"&gt;${stateslist}&lt;/form:option&gt; 
  &lt;/c:forEach&gt; &lt;/form:select&gt;
  </code></pre>