hi, multiple users are logging in different nodes,if one user disconect with he server then how would server identify the client session.I think server is able to maintain each client sessionID.but if the sessionID expires then how would server know its state? i don't by means of cookies. pls clarify my doubt.
If you're asking: how would the server know if the user disconnected, then the answer is the server would not know. The server would continue to maintain the session for that user who disconnected until a predetermined amount of time of inactivity has passed - then the server would invalidate the session.
Hi julian, Thanks for ur resp.But my question is, "how would the webserver maintain the client state?" The answer is the server maintain client state using HtppSession object. getSession() method used to store information about particulat client.ok.
Actually server is able to maintain mutiple client's state information.if one user disconnect with the server then "how would the server know?."
I think server would not care of this which maintains client information even client disconnect with server.pls clarify my doubt
Paraphrasing what Jeroen and Peter have said, the misconception here is that the client is connected to the server. It's not (HTTP is stateless; disconnected). It may have an active session, but there's no connection as such, like with sockets. So the server can't know if the client "disconnects" as it was never connected in the first place.
Typically, a session will expire if no requests are made during a predetermined timeout period.
Does that make sense?
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop