File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Session managing in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Session managing in JSF" Watch "Session managing in JSF" New topic
Author

Session managing in JSF

Adrian Bustos
Greenhorn

Joined: Apr 25, 2011
Posts: 8
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!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15624
    
  15

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session managing in JSF
 
Similar Threads
Http 404, type - status message and resource not found
In Rich Faces rich:panelMenu a4j:commandButton action not called
a4j is not found
JSF+Spring+Hibernate Session Problem
message /.jsp not found in JSF2.0+RichFaces3.3.3+Tomcat6.0.29