I need to pass information from a component that is on the jsp page to a controler that is in java.
So I understand the best way is via AJAX.
Municipality component
<label for="municipio"><font style="color: red">*</font> Municípios</label>
<select class="chosen-select form-control" id="municipio" name="municipio"
data-placeholder="Selecione um município">
<option value="-1"></option>
<c:forEach var="entidade" items="${listaEntidades}">
<option value="${entidade.id}">${entidade.municpio.codigoNome}</option>
</c:forEach>
</select>
The information is showing correctly on the screen.
I need this information from the component id="municipio" name="municipio", to do actions in the Controller class.