在jsp中给不同submit提交按钮不同的名字,然后在servlet中代码实现:
jsp:
<form action="servlet" method="post">
<input type="submit" name="s1" value="通过"/>
<input type="submit" name="s2" value="删除"/>
</form>
servlet的doPost方法:
String a = request.getParameter("s1");
String b = request.getParameter("s2");
if(a !=null){
//"通过"的实现代码
}
if(b !=null){
//"删除"的实现代码
}