posted 18 years ago
First of all, you might consider using a different implementation of the java.util.Map interface. A java.util.LinkedHashMap will retrieve entries in the order they were added just like an ArrayList does. If you want a map that is always in key order, use java.util.TreeMap.
In answer to your question: Yes, you can access maps by keys using Struts tags. example:
HashMap myMap is a property of myForm:
"one", 1
"two", 2
"three", 3
<bean:write name="myForm" property='myMap("one")' />
This expression evaluates to 1.
[ September 01, 2006: Message edited by: Merrill Higginson ]