i am trying to develop Medical billing System using JSPs and Servlets in which there is a page to show stock , stock is shown in tabular form with columns ProductName,Price,ExpiryDate and Quantity , if user wants to update any detail then he can double click on that field and change its value and then submit . so what is was doing for this , i created each row a form and put an update button along each row ,is it good a practice creating so much froms on a page or creating forms this way ? what can be the drawbacks ? what can be the alternative ?
<c:forEach var="product" items="${productList }">
<form action="updateStock" role="form" method="post">
<div class="form-group">
<div class="row">
<div class="col-sm-3">
<input type="text" value="${product.name }" readonly="readonly"
class="read" name="prodName">
</div>
<div class="col-sm-2">
<input type="date" value="${product.expiryDate}"
readonly="readonly" class="read" name="prodExpiryDate">
</div>
<div class="col-sm-2">
<input type="text" value="${product.quantity}"
readonly="readonly" class="read" name="prodQuantity">
</div>
<div class="col-sm-3">
<input type="text" value="${product.price}" readonly="readonly"
class="read" name="prodPrice">
</div>
<div class="col-sm-2">
<input type="submit" name="update" value="update"
id="updateButton">
</div>
<div>
<input type="hidden" name="prodId"
value="${product.productId }">
</div>
</div>
</div>
</form>
</c:forEach>