jsp - How to track user session in struts 2 -


i using struts 2 mysql. using jsp presentation.in application have 3 users , admin,tester,ba .for example if admin user logged in show him adminindex.jsp page, have done coding in action class return corresponding userindex pages.what want show logged in user in adminindex.jsp , need implement logout functionality. kindly guide or provide me tutorial links.

the user should logged out after few minutes if there no activity.

thanks in advance

the auto-logout comes free. session has timeout. if user idles long, session terminated automatically. default value tomcat 30 min.

also see here: what default session timeout java ee website?

if need implement further logout functionality, kill users session calling:

request.getsession().invalidate(); 

maybe build our own logout.action in struts2.

cheers, mana


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -