Q:

Get data from jsp to another

hello everyone i've been looking how get data from a list from a jsp and put it into another jsp with a form but i dont know how can i get the id from the list and send it to my form :/ btw im working on netbeans 
this is my list.jsp that shows on screen all the errors registered on db
<h1>List of Errors</h1>
    <%
        ErrorDAO daoaut=new ErrorDAO();
        List<ErrorENT> list=daoaut.list();            
    %>
    <table BORDER="3">
        <tr>
            <td>ID</td><td>DATE</td><td>LOG</td><td>ESTATE</td><td> </td>
        </tr>
        <% for(ErrorENT aut:list){ %>
        <tr>
            <td> <%= aut.getIdError()%> </td>
            <td> <%= aut.getDate()%> </td>
            <td> <%= aut.getLog() %> </td>
            <td> <%= aut.isEstate() %> </td>
            <td><input type="button" id="btnUpdate" value="Update"/></td>
        </tr>
        <% } %>
    </table>

and somehow when i click on the button Update it should get the id from the row and pass it to my form, but i dont know how to get the id and how it should be recived from the other side :(

A:

Using Hidden Tag Or using anchor tag 
<h1>List of Errors</h1>
    <%
        ErrorDAO daoaut=new ErrorDAO();
        List<ErrorENT> list=daoaut.list();            
    %>
    <table BORDER="3">
        <tr>
            <td>ID</td><td>DATE</td><td>LOG</td><td>ESTATE</td><td> </td>
        </tr>
        <% for(ErrorENT aut:list){ %>
    <form action="Your another jsp" method="post">  // using form for submit to another jsp
        <tr>
            <td> <%= aut.getIdError()%> </td>
            <td> <%= aut.getDate()%> </td>
            <td> <%= aut.getLog() %> </td>
            <td> <%= aut.isEstate() %> </td>
    <td><input type="hidden" value="<%=aut.getIdError()%>" name="id"/></td>
            <td><input type="button" id="btnUpdate" value="Update"/></td>
        </tr>
    </form>
        <% } %>
    </table>

// now you can IdError from next page using request.getParameter("id");
2 ND METHOD USING anchor tag
<%
        ErrorDAO daoaut=new ErrorDAO();
        List<ErrorENT> list=daoaut.list();            
    %>
    <table BORDER="3">
        <tr>
            <td>ID</td><td>DATE</td><td>LOG</td><td>ESTATE</td><td> </td>
        </tr>
        <% for(ErrorENT aut:list){ %>

        <tr>
            <td> <%= aut.getIdError()%> </td>
            <td> <%= aut.getDate()%> </td>
            <td> <%= aut.getLog() %> </td>
            <td> <%= aut.isEstate() %> </td>
            <td> <a href="your page name?id=<%=aut.getIdError()%>"><input type="button" id="btnUpdate" value="Update"/> </a></td>
        </tr>
    </form>
        <% } %>
    </table>

