请问一下老师,我按照视频完成注册的代码时注册失败,这个会那里代码出了问题呀,麻烦老师帮忙解决一下。谢谢
try {
//获取前台传递的注册函数
Map<String, String[]> map = request.getParameterMap();
User user = new User();
BeanUtils.populate(user, map);
//创建service对象
UserService us = new UserServiceImpl();
us.registerUser(user);
//注册成功
request.getRequestDispatcher("/login.jsp").forward(request, response);
} catch (Exception e) {
// 注册失败
request.getRequestDispatcher("/registerFail.jsp").forward(request, response);
}