File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Count the number of online people

 
Vu Pham
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

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

Thanks all
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vu Pham
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all very much
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic