I wantr to know, How many number of users logged in to
website? can any one answer

Answer Posted / raju

we need to write a servlet class, that is login servlet class. Whenever user going to login to the application ,server has to create login servelt object. so every time service method got executed for every user login. so write a private static int count variable as part of login servlet class and increment the counter value in service() method and store the counter value into application scope.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a policy?

1749


Whats new with the stop(), suspend() and resume() methods in jdk 1.2?

559


Are enterprise beans allowed to use thread.sleep()?

622


Describe responsibilities of Activator?

1642


What value does read() return when it has reached the end of a file?

524






Is the infobus client side only?

585


How are the elements of a cardlayout organized?

578


How is a java object message delivered to a non-java client?

557


What is jboss?

549


What are the types of scaling?

530


What are the call back methods in entity bean?

538


Explain phantom read?

1718


Can I run seam with jdk 1.4 and earlier?

537


What are local interfaces? Describe.

672


What is synchronization and why is it important?

521