同一个表单中使用多个不同submit将不同功能提交到同一servlet中的不同操作的实现

在jsp中给不同submit提交按钮不同的名字,然后在servlet中代码实现:

jsp:


servlet的doPost方法:

String a = request.getParameter("s1");

String b = request.getParameter("s2");

if(a !=null){

//"通过"的实现代码

}

if(b !=null){

//"删除"的实现代码

}



你可能感兴趣的:(J2EE)