> hi friends...
>
> i have web application its login based... my problem
> is i have to show the all user names using
> application currently in that page.. so how can i do
> that?
> any one tell me...
>
> thankx in advance...
here's an article that may help--just add a Map and throw each successful login into the Map..use the Map size for a count:
http://www.stardeveloper.com/articles/display.html?article=2001112001
It's fairly straightforward.
Extend your login and logout logic with the following basic example:private static Set<User> loggedInUsers;
public void login(User user) {
loggedInUsers.add(user);
}
public void logout(User user) {
loggedInUsers.remove(user);
}
or use Set<String> for user names only or so.
Message was edited by:
BalusC