From 050186608b1e0326ecdc0c6c0d119cbe28c26cd6 Mon Sep 17 00:00:00 2001 From: Sofia Baltzi <> Date: Thu, 12 Oct 2017 11:25:51 +0000 Subject: [PATCH] Remove username from session --- .../dnetlib/openaire/usermanagement/ResetPasswordServlet.java | 3 ++- src/main/webapp/resetPassword.jsp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/dnetlib/openaire/usermanagement/ResetPasswordServlet.java b/src/main/java/eu/dnetlib/openaire/usermanagement/ResetPasswordServlet.java index 5d8a14f..b45994f 100644 --- a/src/main/java/eu/dnetlib/openaire/usermanagement/ResetPasswordServlet.java +++ b/src/main/java/eu/dnetlib/openaire/usermanagement/ResetPasswordServlet.java @@ -41,7 +41,7 @@ public class ResetPasswordServlet extends HttpServlet { HttpSession session = request.getSession(); String username = (String) session.getAttribute("username"); - + String password = request.getParameter("password"); String confirmPassword = request.getParameter("password_conf"); @@ -65,6 +65,7 @@ public class ResetPasswordServlet extends HttpServlet { } } + session.removeAttribute("username"); response.sendRedirect("./success.jsp"); printWriter.close(); } diff --git a/src/main/webapp/resetPassword.jsp b/src/main/webapp/resetPassword.jsp index 8b48090..259e66b 100644 --- a/src/main/webapp/resetPassword.jsp +++ b/src/main/webapp/resetPassword.jsp @@ -1,7 +1,7 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> -<%String name=(String)request.getAttribute("name"); - out.print("your name"+name);%> +<%--<%String name=(String)request.getAttribute("name");--%> + <%--out.print("your name"+name);%>--%>