It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Java Forum

Doubts regarding session management.

Doubts regarding session management.

Postby murliprasad on Sun May 06, 2007 6:19 am

Once we set the session using session.setAttribute(). Will it stay active for the duration of session timeout set in WEB.XML
(I am using tomcat server).

How can the user manually logout and create a new session(before the session timeout). Do we have to use session.inactivate method.

Thank you in advance.
murliprasad
 
Posts: 3
Joined: Sun May 06, 2007 5:57 am

I got it solved

Postby murliprasad on Tue May 08, 2007 9:17 am

Cheers All, I have got the problem solved.

I got my problem sorted using the two functions session.invalidate()
and request.getSession.isNew().

whenever the isNew() method returns false, the user is redirected to the homepage and if the user wants to forcefully logout, I have used the session.invalidate() method to do so.

Thanks everybody for your time.
murliprasad
 
Posts: 3
Joined: Sun May 06, 2007 5:57 am


Who is online

Users browsing this forum: No registered users and 0 guests