i undertand that getSession() and getSession(true) will create a session if already not present and return the one if present and getSession(false) will return if session already exists and null if not.
The server for the very first request will append the sessionId both in URL and cookie and later depending up on clients settings either on theURL or cookie only.
But when i ran this code for the very first time it behaved orrectly.isNew() returned true but later when i killed the session through invalidate and restarted the server,cleared the cookies and ran the servlet now once again the isNew() should return true instead it is always returning false.that means the session already exists what actually is happening here.
Add the following line to your Servlet. Seeing if the ID is really the same is important in isolating the issue.
It's possible that a new session is getting created by a JSP after the first session has been invalidated. JSPs always participate in a session (and thus also create a new one) unless they contain a page directive with session="false".
I added getID() in to my servlet and first i tried with Mozilla i got isNew() false and ID as 62B7411E75C79720CF89C617FEDD5866 again i opened IE 6.0 cleared all the cokies and private data once again i got isNew() false and ID as ADC7C04E309AC4717804A5130A5C4EF9
different session id but isNew() false. I think two seperate sessions are created but isNew() always returns false and i am using servlet and not the Jsp only first screen to invoke a servlet is JSP both creating of session and retriving it from cookies are also in servlet.