Is it possible to get an Object’s attribute through the property tag in struts?
For example, if I have a user object that consist of user name and email, is it possible to modify the code below to have it return the user name and email instead of the whole object?
print('<s:iterator value='UserObjects'><tr><td><s:property/></td> </tr></s:iterator>');
I don’t know why it refuses to let me input struts tag into the question, sorry for the above
Currently the above returns everything in UserObjects.
Thanks!
If you have a bean that has a method like this:
you should be able to access it with the property tag like this:
Check out the 3rd example down on the struts iterator documentation.