Ravi Kiran V wrote:Are you not handling Guest users ??
Your coding is as such that :
If a User opens a Web page you cant create a Session for him , until he logs into the web site .(He may open the web page just to browse , without logging in )
I think that depends on the business scenario whether Yekkala Krishna wants to know number of concurrent users or number of concurrent active request? If it's active users, sriram's reply is sufficient but if it's number of active request, you may choose ServletRequestListener instead.
One more modification, I would prefer to use AtomicInteger instead.