Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum number of user for a web application

Tags:

jsp

In my web application i need to restrict the maximum number of user accessing my web application.The no of users are configured in a separate properties file.I have created a HttpSessionListener interface to track different users but the problem am facing is that one user can request using multiple instances of browser and the number of users gets increased by 1 even though the same user with different browser instance.i need to count the users based on different IP address or some other unique parameter.

like image 885
Lalchand Avatar asked May 05 '11 15:05

Lalchand


1 Answers

A possibility could be to use session cookies - if the new connected user doesn't have a session cookie, give them one and increment your counter, otherwise don't increment the counter.

like image 137
epochengine Avatar answered Oct 13 '22 14:10

epochengine