0

Session Time out [closed]

asked 2019-05-07 17:10:46 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2617 3 8
http://emrpms.blogspot.in...

Hello

Our client wants to Provide option for each user to maintain their own session time out in minutes. We can store in the Database. But how and where to set that value in ZK ?

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by Senthilchettyin
close date 2019-05-09 13:03:39

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-05-09 09:30:29 +0800

cor3000 gravatar image cor3000
4531 2 7
ZK Team

updated 2019-05-09 11:56:27 +0800

You can set the session timeout as in any standard servlet application.

HttpSession.setMaxInactiveInterval or call the delegating method from ZK's Session object.

https://www.zkoss.org/javadoc/latest/zk/org/zkoss/zk/ui/Session.html#setMaxInactiveInterval-int-

https://github.com/zkoss/zk/blob/v8.6.1/zk/src/org/zkoss/zk/ui/http/SimpleSession.java#L361

UPDATE:

here an example:

//set the current user's session timeout to 5 minutes
Sessions.getCurrent().setMaxInactiveInterval(300);
link publish delete flag offensive edit

Comments

Thank you. We will try. It would be great if any example provided for the same

Senthilchettyin ( 2019-05-09 11:38:10 +0800 )edit

added an example ...

cor3000 ( 2019-05-09 11:56:40 +0800 )edit

Yes it works. Thanks

Senthilchettyin ( 2019-05-09 13:03:16 +0800 )edit

I have another question, i will post as seperate ticket

Senthilchettyin ( 2019-05-09 13:03:54 +0800 )edit

Question tools

Follow
1 follower

RSS

Stats

Asked: 2019-05-07 17:10:46 +0800

Seen: 11 times

Last updated: May 09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More