How do I pass current item to Java method by clicking a hyperlink or button in JSP page?
Simplest way: just let the link point to a JSP page and pass row ID as parameter: <a href=”delete.jsp?id=1″>delete</a> And in delete.jsp (I’m leaving obvious request parameter checking/validating aside): <% dao.delete(Long.valueOf(request.getParameter(“id”))); %> This is however a pretty poor practice (that was still an understatement) and due to two reasons: HTTP requests which modifies the data … Read more