This content has been marked as final. Show 3 replies
Renew as in create a new one?
Well you invalidate the current session, which happens automatically after a certain time of inactivity (usually around 20 minutes).
Is there any API in servlets to do it?Yes, HttpSession :s
So to renew a session we need to the below:-
store the old session
invalidate the old session
generate a new session
copy the data of the old session into the new session
Is there any API to renew the session in servlets? I am unable to find any in HttpSession interface?
The "session" is only a Map like I said, I suggest you check out its methods.