I have encountered a problem that I don't really understand. I'm using java code to access a database and then using the jsp part, display in html format the result. The code looks like this:
out.println("<html><body>");
out.println("<form method=\"GET\" action=\"http://localhost:1234/WebLabJSP/delete\">");
out.println("<table>");
out.println("<tr><th>Name</th><th>Quantity</th><th>Category</th></tr>");
ResultSet rs = s.executeQuery("select * from Products");
while(rs.next()){
out.println("<tr><td>" + rs.getString(2) + "</td><td>" + rs.getString(3) + "</td><td>" + rs.getString(4) + "</td><td><input type=\"submit\" value=\"Delete\" name=\"delete" + rs.getString(1) + "\"/></td><td><input type=\"submit\" value=\"Update\" name=\"update" + rs.getString(1) + "\"/></td></tr>");
}
out.println("</table></form>");
out.println("</body></html>");
The problem is, that if I have only the delete button in the form, it works perfectly, but when I added the second button, the page didn't display anything at all. If anyone knows what's going on, please help.