This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have one simple login service implemented in a servlet.
here i get the session id for this servlet context. To authenticate user later in other service, i have other method which matches the session id generated at after login, with currentSessId = request.getSession(false).getId();
where, validateSession method matches currentSessId with sessionId dat was generated at login time (which comes through URL request).