• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Id problem in servlet

harshad kadam
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).

This approach is working fine when i access the this servlet through ip, means{%27username%27:%27admin%27,%20%27password%27:%27admin%27}

But when i access application through domain, it is creating new session Id every time i make the request.

Please advice me what is going wrong here?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic