@Controller
public class MyController {
@RequestMapping("/user2")
public ModelAndView user2(Integer id) {
ModelAndView view = new ModelAndView();
view.setViewName("/index.jsp");
System.out.println(id);
return view;
}
}
jsp中:
为什么表单中传的id,后台打印的值为null