I have been asked previously this and not sure what is supposed to be the answer, the question is suppose you had an online trading page, that allows you to buy and sell stocks whereas all the stocks are constantly changing via ajax, how do you implement to check if the user/session is still active?
- I had suggested to use javascript, where when the user is not keying or not moving the mouse it will prompt that the session will end, and log out the user
- Second alternative, would be to put a session-timeout in web.xml whereas once the user has session timed out it will require the user to relogin.
But both answers I have provided seemed wrong. What is the proper, standard way to handling session on a dynamic page? (i.e buying airplane tickets or stock trading page?)
Aucun commentaire:
Enregistrer un commentaire