L
lord.zoltar
Hello,
I have a bean on my JSP page which is a HashMap. I would like to check
to see if it contains an key, and if so, print a value. In Java, it
would probably look something like:
if (myHashMap.containsKey(k))
system.out.println(myHashMap.get(v));
I've tried <logicresent name="myHashMap" property="<%= keyVal %>">
but think this is actually looking for a getter method "getSomething
()" on myHashMap (Assuming that keyVal evaluates to "something").
Is there a JSP/Struts tag that can access containsKey?
I have a bean on my JSP page which is a HashMap. I would like to check
to see if it contains an key, and if so, print a value. In Java, it
would probably look something like:
if (myHashMap.containsKey(k))
system.out.println(myHashMap.get(v));
I've tried <logicresent name="myHashMap" property="<%= keyVal %>">
but think this is actually looking for a getter method "getSomething
()" on myHashMap (Assuming that keyVal evaluates to "something").
Is there a JSP/Struts tag that can access containsKey?