Find value of a text Input in a database and bring it to a field

0

I'm a bit confused and disoriented, I need to search in a database, the value that is selected from this code and bring a record. I do not know if I'm letting myself be understood. From this list (user) I select JPEREZ and I consult in the table people for JPEREZ and I bring in charge of JPEREZ. I have looked for similar examples but I can not find. Here I leave my JSP, where is the list.

<tr>
<td>Lista Usuario</td>
<td colspan="2">
    <select name="cbobusporOdei_" id="cbobusporOdei_" selected="selected" onchange="ShowSelected();" onkeypress="enfocarControl('txtDNI_', event);">                                            
        <option value="cod_usuario">------</option> 
        <%
        List<Personal> odeis = (List<Personal>)request.getAttribute("personas");
            for(Personal odei : odeis ) {                                                                                                
                %>
                <option value="<%=odei.getUsuario().getIdentificador() %>"> <%=odei.getUsuario().getIdentificador()%></option>
                <% 
            }
            %>                   

        </select>
</td>
<td></td>

In this field, this is where I want to show the data that I would bring from the database.

<tr>
<td>DNI</td>
<td><label>
    <input name="txtDNI_" type="text" id="txtDNI_" 
    readonly="readonly"
    onkeypress=""
    value="" />

</label>
</td>

Thank you.

    
asked by givillan 20.12.2018 в 20:30
source

0 answers