File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Count the number of online people Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Count the number of online people" Watch "Count the number of online people" New topic
Author

Count the number of online people

Vu Pham
Ranch Hand

Joined: May 28, 2005
Posts: 100
Hi all,

How can I count the number of people being online . I just use JSP.

Thanks all
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
Can you elaborate on what you mean by "the number of people being online"? Do you mean the number of people who are looking at a particular web page at the same time? There is no way to know that (unless you want to ping the originating web site via AJAX as long as the page is open in a browser).

What exactly is it you are trying to achieve?


Ping & DNS - my free Android networking tools app
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What you can do is keep track of the active sessions using a sessionListener.
I have a sample app that does this.
It also keeps track of the time remaining for each session and the login name for each of the session's users.

See: http://simple.souther.us/not-so-simple.html
Look for session monitor.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Vu Pham
Ranch Hand

Joined: May 28, 2005
Posts: 100
Thanks all very much
 
jQuery in Action, 2nd edition
 
subject: Count the number of online people