Harshit
Now i want that everytime a user logs in i should create a session using the user id and reuse it if the user logs in again
That is not a good idea... are you trying to say that if a user logs in today you will create a session then the user logs out and does not login again for one week you will keep the session object for one week..???
that is not how a session should be used.. you would be better if you created a new session each time the user logs in
The significant problems we face cannot be solved by the same level of thinking which created them – Einstein
SCJP 1.5, SCWCD, SCBCD in the making