View Single Post
  #2 (permalink)  
Old 01-04-2008, 10:19 PM
gibsonrocker800's Avatar
gibsonrocker800 gibsonrocker800 is offline
Senior Member
 
Join Date: Nov 2007
Location: New York
Posts: 143
gibsonrocker800 is on a distinguished road
Send a message via AIM to gibsonrocker800
well i dont know anything about JSP, but i know that in regular programming, to prevent added a duplicate object to a certain list, you can use a HashSet.

Set<TypeName> list = new HashSet<TypeName>();
list.add(whateverYouWantToAdd);

If the use enters something duplicate, the hashset silently ignores this, and it is not added.

I hope that helps.
__________________
//Haha javac, can't see me now, can ya?
Reply With Quote