I've been hung up on this issue for a while now, and it's driving me insane.
I have a hash that looks like this in java:
hash.get("1") => "Hello"
hash.get("2") => "Hello"
hash.get("3") => "Hello"
hash.get("4") => "Hello"
This works in JSP to get "1":
${hash["1"]}
But this doesn't:
<c:forEach begin='1' end='4' var='index'>
${index}
${hash[index]}
</c:forEach>
Why can't I access an element in a hash in JSP by a variable's alias? I can use a foreach loop on the hash, but I don't want to do that. Is it possible, at all, to just access a hash element by a variable-aliased key?