Using Jigsaw, W3C's Server, I have to find out how many sessions are there at a given time. Any help will be greatly appreciated
Now in the JSP pages, at the top, check if the User object exists in the Session scope. If it doesn't, create one and add it to the Session. This will automatically call the valueBound on that object and increment the counter. When a persons session expires, or the User object is removed from the session, the valueUnbound is automatically called and the counter decrements.
I usually make this check a seperate JSP page which I include on all the other pages. Then all you need to do is get the User.counter value at any time to see how many people are on the system.
If you need some code examples, email me privately and I'll send you them.