Java EE 6 (for example, Glassfish 3 will accept $ {a.getAttribute ('foo')}) supports method calls, Java EE 5 does not. Here you will need to open your card as follows:
public Map getAttributes() {
return map;
}
to make the expression $ {a.attributes ['foo']}) work.
If you are outside of Java EE / JSP, you can use an EE 6 compatible implementation, such as JUEL 2.2.x, which supports method calls.