-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Can I get the total number of active sessions on my web application using ZK API? (using apache-tomcat)
Sessions.getCount();
Greetz chill.
Exactly what I need. Thanks for the answer.
Now I have another question: using Sessions.getCurrent().invalidate(), the count number doesn't change after the client makes logout The getCount still returns the total number of clients who where connected on my app.
In you web.xml do you have the following :
<listener>
<description>ZK listener for cleanup when a session is destroyed</description>
<listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class>
</listener>
and if you use spring security its Spring who handle's the sessions so you can do this with code :
HttpSession s = (HttpSession)
Sessions.getCurrent().getNativeSession();
s.invalidate();
Sessions.getCurrent().invalidate();
or check if your spring security config is correct.
it's already configured. Another idea?
Asked: 2014-02-12 18:46:23 +0800
Seen: 34 times
Last updated: Feb 14 '14
Do not update to ZK Studio 2.0
Catch Server 503 Error - Or Catch Stale Page
how to save spreadsheet data into postgres database?
One controller file with multiple zul file
Why am I getting authentication error for ZK studio activation?
How can i make Tomcat (with virtual hosts) to parse the zul page in subfolders?