Q:

Getting data from the dynamically updated fields from JSP to Servlet

<li>
  <div id="time"style="float: left;">
    <div id="fromtime" style="float: left;">
      <span class="fromtime">From</span><br><br>
      <input type="text" size="7" class="from_time" name='FromTime'/>
    </div>
    <div id="totime" style="float: left;">
      <span class="totime">To</span><br><br>
      <input type="text" size="7" class="to_time" name='ToTime'/>
    </div>
    <div style="clear:both;">
    </div>
  </div>
</li>

In this portion of my form, I need to take input from the user for 'FromTime' and 'ToTime'. 
On entering these values, I dynamically create another li (using jquery) just like above to have another 'FromTime' and 'ToTime' and goes on.  How can I retrieve all these 'FromTime' and 'ToTime' in my servlet?  When I use request.getParameter("FromTime") and request.getParameter("ToTime"), I get only the first li values. 

A:

Use getParameterValues() to get an array of all the values with a given name.