I want to read data from a hash map in JSP, but without the use of JSTL <c:forEach>
or a for
loop. How can I do this?
You need to know the keys beforehand.
${map.key}
The above gets the value of map.get("key")
.
Or if the key contains dots
${map['key.with.dots']}
This gets the value of map.get("key.with.dots")
.
Or if it's a dynamic key
${map[dynamicKey]}
This gets the value of map.get(dynamicKey)
.