I have a jsp page with anchor below:
<a href ="servletpage"> Delete <a/>
<a href = "servletpage"> Update<a/>
As a result of what link the user clicks, either an update or delete will be called from the servlet. Does anyone know how we can perform the above? I also need to send the attributes which are in my form to the servlet - without using submit button from my form as the submit button is already redirecting to a servlet performing add record operation.
答案 0 :(得分:0)
您需要使用不同的方法来处理两个操作。
<a href="servlet?action='delete'"> Delete</a>
<a href="servlet?action='update'"> Update</a>
像这样。
希望这有帮助!