diff --git a/WebContent/html/webpages/redirect/createProfile.jsp b/WebContent/html/webpages/redirect/createProfile.jsp new file mode 100644 index 0000000..e3f9b4c --- /dev/null +++ b/WebContent/html/webpages/redirect/createProfile.jsp @@ -0,0 +1,54 @@ +<%@ page import = "database.*,entities.Device" %> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + + +
+ + + + + + + +You shouldn't be seeing this page :)
+ +<% +//make instance +Cookie userCookie,newCookie; +String sso = request.getParameter("sso"); +String name = request.getParameter("name"); +String loc = request.getParameter("loc"); +String ph = request.getParameter("ph"); +String email = request.getParameter("email"); +//form was submitted +if(request.getParameter("submit") != null){ + EmployeeQueries.addEmployee(sso,loc,name,ph,email); + request.getSession(); + session.setAttribute("ssoNum", sso); + userCookie = new Cookie("ssoNum", sso); + userCookie.setMaxAge(30*60); + userCookie.setPath("/"); + response.addCookie(userCookie); + newCookie = new Cookie("name",name); + newCookie.setMaxAge(30*60); + newCookie.setPath("/"); + response.addCookie(newCookie); + response.sendRedirect("../index.jsp"); +} + +%> + + \ No newline at end of file diff --git a/WebContent/html/webpages/userLogin.jsp b/WebContent/html/webpages/userLogin.jsp new file mode 100644 index 0000000..f3f35ff --- /dev/null +++ b/WebContent/html/webpages/userLogin.jsp @@ -0,0 +1,108 @@ +<%@ page import = "database.*,entities.Location" %> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<%@ page import = "java.sql.*" %> + + + + + + + + + +