I want to update a multiple values in database with the use of checkboxes at same time with single query in advance java. I am using this code:
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link href="../../css/style.css" rel="stylesheet" type="text/css">
    </head>
    <body>
        <html:form action="viewappnt">
            <table align="left" valign="top" width="295" border="0" id="box-table-b" >
                <thead><tr align="center">
                        <th colspan="4" nowrap><bean:message key="viewapp.heading"/></th>
                    </tr></thead>
                    <%
                        regForm reg = (regForm) session.getAttribute("reg");
                        reg.getspec();
                        String sql = "Select * from appointment where specs=?";
                        ArrayList alist = new ArrayList();
                        alist.add(reg.getSpecs());
                        ResultSet rs = SQLC.getData(sql, alist);
                        int t = 0;
                        while (rs.next()) {
                            String userid = rs.getString("userid");
                            String appdate = rs.getString("appdate");
                            String apptime = rs.getString("apptime");
                    %>
                <td nowrap ><html:text property="appuserid" value="<%=userid%>" size="3" readonly="true" styleId="htmltext"/></td>
                <td width="106"><html:text property="appdate" value="<%=appdate%>" size="5"/></td><td width="80">
                    <html:text property="apptime" value="<%=apptime%>" size="5"/></td>  
                <td><html:checkbox property="apppat"  value="<%=userid%>"></html:checkbox></td>
            </tr> 
            <%
                    t = t++;
                }
            %>
            <tr>
                <td colspan="4" align="center" valign="middle" nowrap><html:submit property="method"><bean:message key="UserForm.apppat"/></html:submit></td>
            </tr>
        </table>
    </html:form>
I'm not getting how to use update command for multiple values through this.
 
     
    