I have made an application in Java(Struts Framework).
Is there a direct way or web.xml mapping or something else from where i can restrict the number of users logged in my application.
At present, I want only 2 users to login in my web application. Also, i can change the number any time. so want to make it a dynamic application.
P.S. : Don't want to use the traditional servlet concept of static variable and all as its creating problem in my application.
So our goal is to store the current number of logged in user, be able to read it, and be able to modify it by some means. We have a number of alternatives to static variable: