This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2 iterator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 iterator" Watch "Struts2 iterator" New topic

Struts2 iterator

David Liles

Joined: Jul 18, 2012
Posts: 1
The below "issue" is resolved... I'm not sure what the problem was but I had to reboot my laptop and when it restarted the .jsp appeared to display the object values as expected. Is there a possible page cache that was cleared when the computer rebooted?

I am starting to work with Struts2 and am having trouble displaying object values that are contained in an ArrayList. I am populating an ArrayList with PersonInfo objects that are being populated from a database. If I use a simple <s:property /> tag in the .jsp the following is displayed: com.mtc.beans.PersonInfo@577d52d9 which indicated the ArrayList is populated with a PersonInfo object. For the life of me I haven't been able to figure out how to get the object values to display.... such as firstName, lastName.... etc...

PersonInfo Class is very straight forward... getters and setters for the individual attributes.

Action Class

public class ListCustomersAction extends ActionSupport {

private static Logger log = Logger.getLogger(ListCustomersAction.class.getClass());
private List list = new ArrayList();

public List getList() {
return list;

public String exectue() throws Exception {
try {
list = new CustomerSRV().listCustomers();
catch(Exception e) {
log.error("--- " + this.getClass().getName() +
"--- MESSAGE: " + e.toString());
return SUCCESS;


<% taglib prefix="s" uri="/struts-tags" %>
<td colspan="2"><jsp:include page="/layout/header.jsp" /></td>
<td><jsp:include page="/layout/menu.jsp" /></td>
<s:iterator value="list">
<s:property value="firstName" /><br>
<td colspan="2"><jsp:include page="/layout/footer.jsp" /></td>
I agree. Here's the link:
subject: Struts2 iterator
It's not a secret anymore!