What is the proper way to close a Web Client so it does not consume a Servoy license?
We are using Servoy 5.2.4 with Enhanced Security enabled and the web client setting “servoy.webclient.useAjax” is set to true.
In the web.xml file on the server, the “” is set to 5 minutes.
If a solution is loaded in the Web Client and the following code is executed when the user clicks a “Log Off” button:
function logOff()
{
security.logout();
application.closeSolution();
}
the default Servoy “Select Solution” page is displayed, however looking at the clients page in the Servoy Admin, the web client is still listed and consumes a license even though the loaded solution shows up as “”. This web client session (and the Servoy license used by it) is released only after the session-timeout period in the web.xml has elapsed.
I can understand that behvior if the user simply closes the browser or navigates to a different site without explicitly logging off, however there should be an option to release immediately the web client session and the used Servoy license. How can we “close” the web client session and release the used license immediately without having to wait for the Tomcat session timeout to expire (which is by default 30 minutes)?
function logout()
{
var serverUrl = '/servoy-webclient/templates/default/expired.html'
application.showURL(serverUrl,'_self')
application.exit()
}
which works perfectly!
(we are also using enhanced security, and we forward to our own expired.html…)
did you test this in a real client/server environment?
Thanks for the suggestion - will give it a try. And yes, the behavior which we are seeing is happening on a real Servoy Application Server and not in the Servoy Developer.
{
var serverUrl = ‘/servoy-webclient/templates/default/expired.html’
application.showURL(serverUrl,‘_self’)
application.exit()
}
which works perfectly!
(we are also using enhanced security, and we forward to our own expired.html....)
did you test this in a real client/server environment?
Harjo, you are a genius!
I was looking for EXACTLY this (although I am going to use a different URL…)