• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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> ?

 
He was expelled for perverse baking experiments. This tiny ad is a model student:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic