Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How can we retreive session from session id  RSS feed

 
Chandra Bairi
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we retreive session from session id when I am using the URL rewriting mechanism.
regards
shekar
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regardless of how the session id is supported, via cookies or URL rewriting, the container should take care of matching it with the session and returning it via request.getSession()
As a security feature, you can't (or at least shouldn't be able to) access a session by providing the session id.
If you are not getting the session back, have a look at the configuration of your server. You'll need to tell us which server you're using, but I know that you need to explicitly tell WebSphere to accept session ids from the URL.
Dave
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!