tofranklu - 2006-05-18

hi,
I am a beginner to DT and having problem with my code.

Basically, I just want to create a list with few objects in the list to have the first flavor of DT.
however, it keeps giving me same error message like
========
Exception: [.LookupUtil] Error looking up property "name" in object type "org.apache.jsp._1_jsp$Item". Cause: Property 'name' has no getter method
=========

and the item class looks like the following

class Item {
private String pw;
private String name;

public void setPw(String i) { pw = i; }
public void setName(String s) { name = s; }
public String getPw() { return this.pw; }
public String getName() { return this.name; }

}

here is my jsp code,
<%
Item m1 = new Item();
Item m2 = new Item();
m1.setPw("1");
m1.setName("john");
m2.setPw("2");
m2.setName("john2");

    ArrayList list = new ArrayList();
    list.add(m1);
    list.add(m2);       
    request.setAttribute( &quot;list&quot;, list );
%&gt;

&lt;display:table name=&quot;list&quot;&gt;
  &lt;display:column property=&quot;name&quot; /&gt;        
&lt;/display:table&gt;

===========================
Any advise will be appreciated,

thanks.
FRank