I'm developing a Java application where I get the data from the database and present it to a <select><option>
but I do not know how to get the value
selected and send per parameter.
JSP
<c:choose>
<c:when test="${!empty param.descricao}">
<c:forEach items="${requestScope.produtos}" var="registro">
<div class="col-sm-6 col-md-6">
<h3>${registro.descricao}</h3>
<p>${registro.codigo}</p>
<div class="linha_compra"></div><br/><br/>
<div class="col-sm-6 col-md-6">
<p>${registro.valor}</p>
<select id="parcelas">
<option value="1"> ${registro.prod_parc1}</option>
<option value="2">${registro.prod_parc2}</option>
<option value="3">${registro.prod_parc3}</option>
<option value="4">${registro.prod_parc4}</option>
<option value="5">${registro.prod_parc5}</option>
<option value="6">${registro.prod_parc6}</option>
<option value="7">${registro.prod_parc7}</option>
<option value="8">${registro.prod_parc8}</option>
<option value="9">${registro.prod_parc9}</option>
<option value="10">${registro.prod_parc10}</option>
</select><br/><br/>
<div class="col-sm-6 col-md-6">
<button type="button" onclick="" class="botao_comprar"><a href="http://localhost:8080/EccomerceJSP2/Carrinho?descricao=${registro.descricao}&valor=${registro.valor}&parcela=">COMPRAR</a></button>
</div>
</div>
</c:foreach>