session tracking
I would to develop this:
I'm a client go to my server and I receive one session id.
Suddenly my client goes down so i disconnect form the server.
Next I connect to the server again but I would the same session tha i loose when my bowser goes down, is possible?
Thank y in advance
[313 byte] By [
puntinoa] at [2007-11-27 5:01:56]

# 1
Rather use cookies in combination with a HttpSessionListener. On every destroy of the HttpSession, save the session data in a DB along an unique ID (the SessionID isn't!) and store this ID in a cookie. Then on every create of the HttpSession, retrieve the ID from the cookie and restore the data from the DB into the HttpSession. Add some more server-side checks, for example the logged in username and the IP address to block cookie-hackers.
# 2
Thank you balus.
I wonder if the server (in my case Tomcat 5.5.23) creates a table or structure where are allocated all session open and if I can acces to it. by API
For example:
TableSession is the tabel of all session open on the server
TableSession ts= new Table session()
HttpSession= ts.getSession( "idSession")
where idSession is the identifier of session that I need
Thank you