I'm displaying my data in JSP using foreach from session variable.That session variable is Arraylist of products. I want to send the data from JSP to another JSP when user clicks on one product. How Can i achieve that>
<div class="row">
<c:forEach items="${listProducts}" var="products">
<div class="column">
<div class="card">
<form action="disp.jsp" method="GET">
<h3>${products.pname}</h3>
<p>price = ₹${products.price}</p>
<p>Left out Stock: <b> ${products.quantity} </b> </p>
<p> <input type="number" id="points" name="points" step="1" min="1" max="${products.quantity}"> </p>
<p id="${products.pid}"></p>
<p><button id="cartBtn">Add to Cart</button></p>
</form>
</div>
</div>
</c:forEach>
</div>
How can send that specific product id and quantity which is clicked by user to another JSP. It is in for loop i cannot directly use request.getParameter("name")
.