• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Session Management in java

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic