Remove username from session

This commit is contained in:
Sofia Baltzi 2017-10-12 11:25:51 +00:00
parent b565da194c
commit 050186608b
2 changed files with 4 additions and 3 deletions

View File

@ -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();
}

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<%@ 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);%>--%>
<html lang="en-gb" dir="ltr" vocab="http://schema.org/">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">