Server Session Timeout

Hello,

Im working with JSP's in WSAD 5.0. The server session timout for my application has been set through the administration console. I was suppose to dsiplay an popup with message "Your session is about to expire" 2 min prior to the session expires and then as the session expires the message changes to "Your sessin has expired" to achieve this i used setInterval()method with interval as 30 min and setTimeout() methods of java in javascripts.Now comes the problem, as the second message is displayed and after i close the message pop up n then access ne other screen the session does not expire and allowes me to access other pages.

Does the setInterval() method that works in background stops the session from expiring even if there is no data sent or received from the server.

And is there ne way i can get the set server timeout into my application at runtime to set the interval in my setInterval() method.

Another problem is that we have various server at onsite where the application is being run and the session timeout for them is different according to the need, thus i cannot hardcode or set the session timeout value in my application. It would be a great favour if i can get to know how i can get the set server session timeout for a perticular server based upon which the application is run.

Please help

Thanks

Kaustubh

[1388 byte] By [Kaustubh_Handea] at [2007-11-27 0:51:17]
# 1

A better way to handle session timeouts would be to redirect the user to the login page, instead of displaying yet another pop-up.

Once the user is redirected, he would have to login again to continue.

As for setting the timeout, you could configure it in the web.xml file of each server, instead of hard-coding it in your app (<session-timeout/> element ).

karma-9a at 2007-7-11 23:22:01 > top of Java-index,Java Essentials,Java Programming...