• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Management in java

 
muthu bharathi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everybody....


I need the guidance for the following scenario

Session Expiry: 15 seconds before the session expires, show a pop-up with the time remaining running. Ask a question "Do You want to Continue?" On clicking Yes continue the session. On Clicking No kill the session.


--
regds,
M. Bharathi

 
Ankit Garg
Sheriff
Posts: 9528
32
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll have to send Ajax requests at continuous intervals to the server to check how old the session is. The server has no way of informing this to the client browser. Since the ajaz request will keep sending requests, so the session will not timeout automatically. Thus you'll have to manually invalidate a session if its too old. This can be done in the same program that will check how old the session is. You can store a session attribute which will store the time at which the session started or user pressed yes on the confirmation dialog which prompted the user whether to continue the session or not.

Is your application in Struts?? If not I'll move this thread to the appropriate forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic