• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

JAVA + STRUTS

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I iterate over some keyholders <logic:iterate id="keyholder" name="SiteSheetForm" property="keyholders">
each of these keyholders has a keyholder group in my keyholder class have the getter and setter. within the jsp i can't do keyholder.getKeyholderGroup i can only do <bean:write name="keyholder" property="keyholderGroup"/> to get the keyholdergroup attribute from the current keyholder but i want to get it as a string in java so i can compare them. When i did a System.out.println of keyholder it showed that it was just the key of the hashmap not the value any ideas on how to get the value are welcomed. Please help x
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hannah, :-)
I'm not sure if I understand you correctly, but if you want to get the values of a given key in a hashmap you can try something like this:

Just a quick question, what will you compare with your property named keyholdergroup? Will you be comparing it with another property (from another <bean:write> ?

 
Beware the other head of science - it bites! Nibble on this message:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!