jsp - How to get radio button group values in servlet? -


this question has answer here:

i want values selected radio button in jsp form servlet.how values in servlet,for in advance.

jsp page is:      <table class="table" id="attendancetableid" style="width: 500px;">     <%     for(int i=0;i<=se.size()-1;i++) {     %>       <tr>          <td><input type="textbox" name="studentname" value="<%=se.get(i)%>" style="background-color: #a7c5c2" readonly></td>           <td><input type="radio"  name="status_<%= %>" value="present" style="width: 15px; height: 15px;" />present           <input type="radio" name="status_<%= %>" value="absent" style="width: 15px; height: 15px;">absent</td>       </tr>      <%     }     %>     </table>     

you want value same have implemented in form

public void dopost(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception {     for(int i=0;i<=se.size()-1;i++) {       string status = request.getparameter("status_"+i);    } } 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo