我有如下代码:
FriendsList = new ArrayList()
....
ResultSet rs = st.executeQuery(Select);
while (rs.next()) {
Member member = new Member(rs);
FriendsList.add(member);
}
它成功获取结果并转到 Member 类的构造函数并向其添加数据。但是一旦我尝试使用我的 jsp 文件中的 FriendsList 属性访问其属性之一,我就会遇到以下错误:
"Caused by: javax.el.PropertyNotFoundException: Property 'Name' not found on type
application.Member"
使用 Eclipse,我为 Member 类的每个属性生成了一个完整的 setter 和 getter 列表,如下所示:
public String getName() {
return Name;
}
public void setName(String name) {
Name = name;
}