我觉得是// 会员登录
public ActionForward checkMember(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
String name = request.getParameter("name");
MemberForm memberForm = dao.selectMemberForm(name);
if (memberForm==null||memberForm.equals("")) {
request.setAttribute("result", "不存在此会员,请重新登录!!!");
} else if (!memberForm.getPassword().equals(request.getParameter("password").trim())) {
request.setAttribute("result", "密码错误,请重新登录!!!");
} else {
request.setAttribute("memberForm", memberForm);
}
return mapping.findForward("checkMember");
}这段代码的写法,我试验了,如何我是在数据库上直接输入数据就可以登录,但是如果要是在前台的注册页注册后,就算用户名和密码正确也会提示密码错误