Skip to content

Commit

Permalink
just saving progress
Browse files Browse the repository at this point in the history
  • Loading branch information
arc12012 committed Apr 13, 2017
1 parent 0a919e1 commit c4c90bc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
Binary file added WebContent/WEB-INF/lib/activation.jar
Binary file not shown.
Binary file added WebContent/WEB-INF/lib/mail.jar
Binary file not shown.
Binary file added WebContent/WEB-INF/lib/servlet-api.jar
Binary file not shown.
10 changes: 6 additions & 4 deletions WebContent/html/webpages/navbar.jsp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%@ page import = "database.*,entities.User" %>
<%@ page import = "database.*,entities.User,utilities.Mail" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<div class="container-fluid">
<div class="navbar-header">
Expand All @@ -24,14 +24,17 @@
</ul>
</div>
<%
Mail mail = new Mail();
mail.send();
Cookie[] usercookies = request.getCookies();
String navsso = "invalid";
String navname = "error";
Cookie newCookie;
//iterate cookies
System.out.println("Cookies:\n----------\n");
for(Cookie c : usercookies){
System.out.println(c.getName());
if(c.getName().equals("ssoNum")){//when (and if) we get to user cookie we want to reset it
navsso = c.getValue();
c.setMaxAge(0);//delete current
Expand All @@ -41,7 +44,6 @@
break;
}
}
System.out.println("\nnavsso = "+navsso+"\n");
if(navsso.equals("invalid"))//if we didn't get a cookie, redirect to the homepage to log in again!
response.sendRedirect("../../index.jsp");
else{
Expand Down
4 changes: 4 additions & 0 deletions WebContent/html/webpages/orderFormHandler.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ for(int i=0; i<devIDs.length; i++)
TicketQueries.generateTicket(sso, location, devIDs[i], request.getParameter("timeNeeded"));//TODO get ID somehow
}
// Now that tickets have been generated we will want to notify users.
%>
window.location.replace("shoppingCart.jsp");
</script>
Expand Down

0 comments on commit c4c90bc

Please sign in to comment.