1.java代码
@RequestMapping("/register.action")
public ModelAndView register(@RequestParam("userTelNo")String userTelNo, @RequestParam("userPassword")String userPassword) {
ModelAndView modelAndView = new ModelAndView();
String flag=userService.register(userTelNo, userPassword);
System.out.println(flag);
modelAndView.addObject("flag",flag);
modelAndView.setViewName("jsp/success");
return modelAndView;
}
2.请求方式
<form action="register.action" method="post">
手机号码:
<input type="text" name="userTelNo" />
<br />
密码:
<input type="text" name="userPassword" />
<br />
确认密码:
<input type="text" name="userPassword2" />
<br />
<input type="submit" />
</form>
3.执行结果