Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. HttpSession session = event.getSession();
  2. ServletContext context = session.getServletContext();
  3. HashMap activeSessions = (HashMap) context.getAttribute("activeSessions");
  4. if (activeSessions == null) {
  5. activeSessions = new HashMap();
  6. }
  7. activeSessions.put(session.getId(), session);
  8. context.setAttribute("activeSessions", activeSessions);
  9.  
  10. HashMap activeSessions = (HashMap) request.getSession().getServletContext().getAttribute("activeSessions");
  11.  
  12. final HttpSession session = (HttpSession)activeSessions.get(jsessionid);
  13.  
  14. request.getSession()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement