Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get the page info from hidden fields:
- String whichPage = req.getParameter ("page");
- String userName = req.getParameter("username");
- Vector<String> prods = new Vector();
- // First extract session info.
- SessionInfo session = (SessionInfo) table.get(userName);
- // Check if inactive session.
- if (session != null) {
- long minutesSince = (System.currentTimeMillis() - session.startTime) / (1000*60);
- prods = session.sessionProds;
- }
- else {
- // Make session.
- session = new SessionInfo ();
- session.pageCount = 0;
- session.startTime = System.currentTimeMillis ();
- session.sessionProds = prods;
- }
- // Determine action based on which page fired the request and
- // handle in appropriate method.
- if (whichPage.equalsIgnoreCase ("homepagelogin")) {
- String passWord = req.getParameter("password");
- handleLoginPage(out, userName, passWord);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement