Possible Duplicate:
How do I iterate over each Entry in a Map?
I'm following this solution to no effect: https://stackoverflow.com/a/1835742/666468
I am trying to output this Map:
//protected Map<String,String> getImageTagAttributes()
Image image = new Image(resource);
for (Map<String, String> foo : image.getImageTagAttributes()) {
String key = foo.getKey();
String value = foo.getValue();
//output here
}
But I get this error: Can only iterate over an array or an instance of java.lang.Iterable
I imported java.util.Iterator as well, but no luck.
p.s. I wish I could install and use JSTL, but it's not my call.