wood burning stoves 2.0*
The moose likes Servlets and the fly likes jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp" Watch "jsp" New topic
Author

jsp

lrk naidu
Greenhorn

Joined: Feb 04, 2005
Posts: 6
hi all,
if i want to know the of users using the site ,
ex:when we login to yahoo it should be display the no of users using these site is like 10000 and when we logout it should display the no of users are
99999
how to write the code?
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Put the count in application context and increment it by 1 on every login. Use HttpSessionListener to detect logout.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

I'm confused, your thread title is "JSP" but you are asking how to get the number of current users.

If this is strictly a JSP question, we have a JSP forum for JSP questions, whereas this forum is for Servlets questions.

If this is about number of users, then change your thread topic to match it soo when we see a list of the threads in this forum we know what this thread is going to be about.

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: jsp
 
Similar Threads
Anonymous user tracking
URL butchering
This weeks giveaway
Can I change my Last Name?
Displaying time inside a table cell