} else if (collection instanceof Iterator) {
iterator = (Iterator) collection;
} else if (collection instanceof Map) {
iterator = ((Map) collection).entrySet().iterator();
} else if (collection instanceof Enumeration) {
iterator = new IteratorAdapter((Enumeration) collection);
} else {
JspException e =
new JspException(messages.getMessage("iterate.iterator"));
TagUtils.getInstance().saveException(pageContext, e);