我正在尝试从 jsp 中获取表单的值以在控制器中的函数中使用并显示另一个 jsp<form action="/uc"> <input name="cnp" type="text"> <br> <br> <input type="submit" value="Find"></form>这是我的控制器方法 @RequestMapping(value = "/uc", method = RequestMethod.GET) public String userContracts(@RequestParam("cnp") String cnp, Model model) { List<Contract> ContractList = new ArrayList<Contract>(); ContractList = cl.getContractsOfUser(cnp); model.addAttribute("ContractList", ContractList); System.out.println("In uc"); return "UserContracts"; }
添加回答
举报
0/150
提交
取消