Reading form fields

This commit is contained in:
Katerina Iatropoulou 2017-10-02 14:28:37 +00:00
parent d095152d8c
commit 6aa55c08c7
3 changed files with 5 additions and 5 deletions

View File

@ -42,7 +42,7 @@ public class ForgotPasswordServlet extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
String formEmail = (String)request.getAttribute("email");
String formEmail = request.getParameter("email");
if (formEmail == null) {
request.getSession().setAttribute("message", "Error reading email.");

View File

@ -35,8 +35,8 @@ public class ResetPasswordServlet extends HttpServlet {
response.setContentType("text/html");
PrintWriter printWriter = response.getWriter();
String password = (String)request.getAttribute("password");
String confirmPassword = (String)request.getAttribute("confirmPassword");
String password = request.getParameter("password");
String confirmPassword = request.getParameter("confirmPassword");
if (password.equals(confirmPassword)) {
//TODO update ldap

View File

@ -31,8 +31,8 @@ public class VerificationCodeServlet extends HttpServlet {
response.setContentType("text/html");
PrintWriter printWriter = response.getWriter();
String formUsername = (String)request.getAttribute("username");
String formVerificationCode = (String)request.getAttribute("verification_code");
String formUsername = request.getParameter("username");
String formVerificationCode = request.getParameter("verification_code");
if (verificationActions.verificationEntryExists(formUsername, formVerificationCode)) {
response.sendRedirect("./resetPassword.jsp");