diff --git a/WebContent/html/webpages/logout.jsp b/WebContent/html/webpages/logout.jsp new file mode 100644 index 0000000..61449b1 --- /dev/null +++ b/WebContent/html/webpages/logout.jsp @@ -0,0 +1,21 @@ +<%@ page import = "database.*,entities.User,utilities.Mail" %> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<% +Cookie[] usercookies = request.getCookies(); +if(usercookies != null){ + request.getSession(); + session.removeAttribute("ssoNum"); + session.invalidate(); + for(Cookie c : usercookies){ + if(c.getName().equals("ssoNum")){ + //delete cookies + c.setValue(""); + c.setMaxAge(0); + response.addCookie(c); + } + } + +response.sendRedirect("../../logout.jsp"); +} + +%> \ No newline at end of file diff --git a/WebContent/html/webpages/navbar.jsp b/WebContent/html/webpages/navbar.jsp index 4f60228..54b0dd9 100644 --- a/WebContent/html/webpages/navbar.jsp +++ b/WebContent/html/webpages/navbar.jsp @@ -22,6 +22,7 @@