• 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 managing in JSF

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everyone, this is my first post.

I found myself in a pickle regarding session managing in JSF.

For the sake of argument let's say I've a bean that returns the server'current time

Then there's a page that invokes this method every seccond

This works great, but every time this method is invoked the session's lastAccessedTime property is updated.
I need to void this to happend, but only for this specific method invokation.

How can I make that possible?

web.xml

faces-config.xml

Thanks in advance!
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The session timeout counter is automatically maintained by the application server and cannot be modified by application code.

However, if you want to post an AJAX-refreshed display element and still timeout when no useful work has been done, you can always maintain your own countdown timer in the AJAX action processor. When your timer drops to zero, manually log out the user.

You may want to install a servlet filter or phase listener to reset your counter when legitimate page requests are received so that each page doesn't require its own manual counter reset logic.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic