Add error messages
This commit is contained in:
parent
ac33445d54
commit
47f695315b
|
@ -87,8 +87,7 @@ public class ForgotPasswordServlet extends HttpServlet {
|
|||
}
|
||||
|
||||
} catch (LDAPException ldape) {
|
||||
//TODO create error page
|
||||
logger.error("LDAP error" + ldape);
|
||||
logger.error("LDAP error", ldape);
|
||||
response.sendRedirect("./error.jsp");
|
||||
|
||||
} catch (MessagingException e) {
|
||||
|
|
|
@ -55,9 +55,7 @@ public class RemindUsernameServlet extends HttpServlet {
|
|||
|
||||
String verificationCodeSubject = "Your OpenAIRE username";
|
||||
|
||||
|
||||
emailSender.sendEmail(formEmail, verificationCodeSubject, verificationCodeMsg);
|
||||
|
||||
emailSender.sendEmail(formEmail, verificationCodeSubject, verificationCodeMsg);
|
||||
|
||||
} else {
|
||||
request.getSession().setAttribute("message", "User not found");
|
||||
|
|
|
@ -48,6 +48,8 @@ public class VerificationCodeServlet extends HttpServlet {
|
|||
printWriter.close();
|
||||
|
||||
} else {
|
||||
request.getSession().setAttribute("message", "Username or verification code are not valid.");
|
||||
response.sendRedirect("./verify.jsp");
|
||||
// response.sendRedirect("./error.jsp"); or write a message in the session
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue