Link to home
Start Free TrialLog in
Avatar of fivesigmaevent
fivesigmaevent

asked on

access hash object element's property with struts-tags

i have a HashMap h of stats objects S.S is like so

public class S{
  long x;

  public S(long x_){
    x = x_;
  }

  long getX(){
    return x;
  }
}

i'm trying to print x with struts-tags in jsp like so. it prints the size of h and the object type, but does not print the valie of x. any idea how to get x to print?
<s:property value="h.size"/><br/>
<s:property value="h[0]"/><br/>
<s:property value="h[0].x"/><br/>

ASKER CERTIFIED SOLUTION
Avatar of cmalakar
cmalakar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fivesigmaevent
fivesigmaevent

ASKER

arggh. thank you for catching that...