• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

knowing how many guests and registered users

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
there are some sites that tell you, when you visit their site, how many guests and registered users are visiting the site.
example:
when you visit the site, you find :
There are 200 guest online and 50 registered users online.
can you explain to me, how can I implement this mechanism.
 
danny liu
Ranch Hand
Posts: 185
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a. Use a Java Bean to record this data

b. Load this java bean into application scope when application starts

c. Store the state of java bean into database or file. Here you need ContextListener

d. When there is a new access, change the state of java bean, and show "you are xxxx guests"
 
Stephen Huey
Ranch Hand
Posts: 618
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Someone please correct this if I'm wrong, but I believe the simple answer is that you just know whether the person visiting your site is a registered user if you can find that out who they are from a cookie you store in their browser.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic