Auto Log Off once the session expires

前端 未结 5 829
不思量自难忘°
不思量自难忘° 2020-12-05 06:10

Our application logs off after 30 min and gets redirected to login page,i am specifying session timeout in web.xml and using a requestProcessor for redirecting.I want to sho

5条回答
  •  抹茶落季
    2020-12-05 06:54

    Create a Listener class implementing HttpSessionListener and define it in web.xml

    This will notify you when any session is destroyed. Use the sessionDestroyed() method.

    See a full example here:

    http://www.mkyong.com/servlet/a-simple-httpsessionlistener-example-active-sessions-counter/

提交回复
热议问题