Checking if Session is new

31 March 2008

Sessions are used to keep track of the user in applications. Specifically talking about web applications (JSP), we may store objects in the session as well for using them later. Sometimes we wish to know if the session is new or not. This post will show how to do that.

If a session is new, then isNew method of session object will return true otherwise false. When a server creates a session and client has not yet acknowledged the session, the server marks it with new. When the client joins a session, the session does not remain new anymore.

session.isNew();

del.icio.us:Checking if Session is new  digg:Checking if Session is new  spurl:Checking if Session is new  wists:Checking if Session is new  simpy:Checking if Session is new  newsvine:Checking if Session is new  blinklist:Checking if Session is new  furl:Checking if Session is new  reddit:Checking if Session is new  fark:Checking if Session is new  blogmarks:Checking if Session is new  Y!:Checking if Session is new  smarking:Checking if Session is new  magnolia:Checking if Session is new  segnalo:Checking if Session is new  gifttagging:Checking if Session is new

Top Of Page | Trackback

If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.

It will look like this: Checking if Session is new

Leave a Reply