I am trying to write a backup panel showing the backup status of several servers. The idea is to show a table with a JSP that has the dates of the last few days in columns and server names in rows. In this poor person table, I wrote "Yes / No."
+------------+------------+------------+------------+
+ Host Name | 2011-06-10 | 2011-06-09 | 2011-06-08 |
+------------+------------+------------+------------+
| web01 | Y | Y | N |
+------------+------------+------------+------------+
| web02 | Y | Y | Y |
+------------+------------+------------+------------+
Each server makes its own backup and stores the status in Amazon SimpleDb, and I wrote a Java method to get this information over the past few days with the following signature:
public Multimap<String, Map<String, String>> listMysqlBackups(int howManyDays);
Multimap is Google Guava Multimap because I have several backups per day. Output Example:
{2011-06-10=[{web06=Y}, {web05=Y}], 2011-06-08=[{web05=Y}, {web06=Y}],
2011-06-09=[{web05=Y}, {web06=Y}], 2011-06-07=[{web05=Y}, {web06=Y}]}
I do not know how to use this information in JSP. I tried with foreach:
<c:forEach items="${backups}" var="backup" varStatus="backupId">
${backup.key}
</c:forEach>
And the answer was:
javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Don't know
how to iterate over supplied "items" in <forEach>
, ArrayList HashMap, HashMap (, , ). , , , , , Java, , ArrayList ( , 6 7 - 42 ).
?