| Author |
Auto logout in Struts
|
Deepak Lal
Ranch Hand
Joined: Jul 01, 2008
Posts: 507
|
|
How to implement Auto logout feature in Struts based application.?
Example: I have a simple Struts Application and i want it to Auto logout if session is inactive for 1 hr or currently no user is using my Struts based application for 1hr...Please advice Ranchers
|
When The Going Gets Tougher,The Tougher gets Going
|
 |
Cesar Coz
Ranch Hand
Joined: Aug 19, 2010
Posts: 31
|
|
Hello Deepak,
this is what i would do.. i would add a filter to check the session when you make an 'action' and set the filter to expire the session if is inactive in 60m. If there's no session the app will redirect you to an error page
hope this will help you
|
Cesar Coz.
|
 |
Deepak Lal
Ranch Hand
Joined: Jul 01, 2008
Posts: 507
|
|
|
How to implement in Struts 1.x ,Can you suggest/advice me on how to use a filter for above implementation.
|
 |
Richard Golebiowski
Ranch Hand
Joined: May 05, 2010
Posts: 213
|
|
|
Can't you just set the session timeout in the web.xml file?
|
 |
 |
|
|
subject: Auto logout in Struts
|
|
|