I found that the problem is increasing the index after clicking "Add Row". Therefore, I added the following jQuery code to increase the index.
$("#addRow").click(function(){
var addressRow = $('.repeat-address').last();
var addressRowLength = $('.repeat-address').length;
var newAddressRow = addressRow.clone(true).find("input").val("").end();
$(newAddressRow).find("td input,td select").each(function(index,item) {
item.name = item.name.replace(/[0-9]/g,addressRowLength);
});
newAddressRow.insertAfter(addressRow);
});
HTML CODE
<c:set var="index" value="0"/>
<td><form:input path="empDisplayName" class="form-control"/> </td>
<tr class="repeat-address">
<td>Departure Date</td>
<td><form:input placeholder="Departure Date" path="tourDetails[${index}].departDate" required="required" class="datepicker form-control"/></td>
<td>Pincode</td>
<td><input type="text" name="tourDetails[${index}].departDate"/></td>
<td><input type="file" name="tourDetails[${index}].tourTicket"/></td>
</tr>
<tr><td colspan="3"><input id="addRow" type="button" value="Add Row"></td></tr>
POJO. Multipart ( TourDetailsPojo Bean)
private Date departDate;
private Multipart tourTicket;