Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

html:iterator troubles

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've extended HashMap and added a method which returns the HashMap values in a in a html:iterator friendly format. I've tried returning the values as an Array, Iterator, and Collection. However, my code always returns "No Collection Found". What am I doing wrong?

public class Complaints extends HashMap
public java.util.Iterator getAllComplaints() {
return this.values().iterator();


<logic:iterate id="complaint" name="complaints" property="allComplaints">


* If I remove the property parameter, the loop will work but I need would need to use the 'key' and 'value' properties.
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try returning the collection itself in your getAllComplaints() method and not the iterator for the collection.
Your mind is under my control .... your will is now mine .... read this tiny ad
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic