Hello, Im working with jsp's n servlets in WSAD 5.0. In my application the server session timeout value has been set through the server administration console to 30 minutes. Now I need to display a warning message "Your session is about to expire" 2 minutes prior to session expires. So is there ne way throught which i can get the server session timeout value in the my application at run time. Please help.
Why dont you create a httpsessionlistener class? It has two methods which you have to override...
sessioncreated(httpsessionevent) and sessiondestroyed(httpsessionevent). You can write your display message in sessiondestroyed method. So, just before the session is ended the sessiondestroyed is called and your message will be displayed.
If you want to display it exactly 2 minutes before the session expires. I am not sure about how you should go about it. [ April 10, 2007: Message edited by: Atul Savant ]
Originally posted by Atul Savant: If you want to display it exactly 2 minutes before the session expires. I am not sure about how you should go about it.
Yes, that's the impossible part. Your server only responds to requests, so if the client never sends you any more requests then you can't do this notification. And if you think about it for a bit, the client may not even have a page of your web application displayed. They might be checking their e-mail, or they might have turned off their computer.