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

In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?

2436


What is difference between object state and behavior?

823


Which javutil classes and interfaces support event handling?

790


Difference between DurableSubscription and non- DurableSubscription?

1938


What is the difference between a static and a non-static inner class?

844


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

760


How would you detect a keypress in a jcombobox?

884


whats is mean by connectionpooling

1775


What restrictions are placed on the location of a package statement within a source code file?

857


What are the services in RMI ?

2088


What are the diff types of exception?

767


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

783


Which are the different segments of memory?

831


which type of objects reference will be given to client?

2261


What do you know about seam?

782