| Author |
Comparing two vectors in a jsp
|
Pravin Jagan
Greenhorn
Joined: Feb 28, 2005
Posts: 27
|
|
hi, Im working on a module of a network application installer system(which helps to deploy applications over a network)..So idea is basically.. like this.. i get a view of systems on the network on my homepage n when i do a right click it should pop up a window showing the list of applications available on the server and their latest version and the list of application on the systems and their latest version. So it would have display like this so what i need to do here is to colour the row which has difference in versions.(say.. the first row in the above example) so far i have come up with two hastables each containing an application id(unique one) the latest version available on the server and the client. So the hashtable looks some thing like this.. so can anyone guide me on how to do comparison n give the desired output on to the jsp
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Hashtable's containsValue(Object value) method should give you some hints.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
There's nothing JSP-specific about this so I've moved it to the Java in General(intermediate) forum.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Chengwei Lee
Ranch Hand
Joined: Apr 02, 2004
Posts: 884
|
|
Hashtable's containsValue(Object value) method should give you some hints.
containsValue merely tells you if the object exists in the Hashtable. It doesn't link you to any specific application-id. Meaning to say, it doesn't tells you which key it belonged to. I suppose 2 Hashtables are available, 1 to hold the the application-id & deployed version while the other holds application-id & latest version. I'd recommend two methods, containsKey & get instead. Its safer not to assume that both Hashtables contains the equal number of entries. HTH
|
SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Doh! I need to learn to read questions properly. Cheers for clearing up my mistake Chengwei Lee.
|
 |
Chengwei Lee
Ranch Hand
Joined: Apr 02, 2004
Posts: 884
|
|
Doh! I need to learn to read questions properly. Cheers for clearing up my mistake Chengwei Lee.
No problem Paul
|
 |
 |
|
|
subject: Comparing two vectors in a jsp
|
|
|