Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Auto logout in Struts

 
Deepak Lal
Ranch Hand
Posts: 561
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Cesar Coz
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Deepak Lal
Ranch Hand
Posts: 561
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 213
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't you just set the session timeout in the web.xml file?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic