javaweb中,前台向后台提交多个同名(name)参数,后台怎么接受

SpringMVC中可以定义一个数组参数
@RequestMapping(value="/toTest")
public void toTest(HttpServletRequest request,String[] id) throws Exception {
System.out.println(id.length);
}

或者使用request内置对象
String[] id = request.getParameterValues("id");

javaweb中,前台向后台提交多个同名(name)参数,后台怎么接受