Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JForum
Search Coderanch
Advance search
Google search
Register / Login
Help coderanch get a
new server
by contributing to the
fundraiser
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Devaka Cooray
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
paul wheaton
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Carey Brown
Mikalai Zaikin
Bartenders:
Lou Hamers
Piet Souris
Frits Walraven
Forum:
JForum
why this happen?
Migrated From Jforum.net
Ranch Hand
Posts: 17424
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
one user repeat several times in the online user list.
Why this happen ?
[originally posted on jforum.net by lynx286]
Migrated From Jforum.net
Ranch Hand
Posts: 17424
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
and when I refresh again and again, it became more and more online users. the same user repeat lots of times.
[originally posted on jforum.net by lynx286]
Migrated From Jforum.net
Ranch Hand
Posts: 17424
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I resolved this issue by myself. :lol:
In ForumAction.java , add this line: removeDuplicate(onlineUsersList);
before: this.context.put("userSessions", onlineUsersList);
add a function:
public static void removeDuplicate(List list) { for (int i = 0; i < list.size() - 1; i++) { for (int j = list.size() - 1; j > i; j--) { String jName = ((UserSession) list.get(j)).getUsername(); String iName = ((UserSession) list.get(i)).getUsername(); if (jName.equals(iName)) { list.remove(j); } } } // System.out.println(list); }
http://www.mydwbi.com/posts/list/103.page
For your reference.
[originally posted on jforum.net by lynx286]
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
calling doGet(), doPost() on html page load
How can i execute javascript function
Doubt on constructors
always print old session
How to return multiple strings of the same name from text file and array - any help
Thread Boost feature
More...