无法在我的显示标签中获取 bean 的值.. 显示以下错误
String sql;
List<AcceptBean> list = new ArrayList<AcceptBean>();
PreparedStatement prest = (PreparedStatement) conn.prepareStatement(occQuery);
ResultSet rs = prest.executeQuery(occQuery);
System.out.println(rs);
String first = "";
String last = "";
String vill = "";
String son = "";
String dist = "";
while (rs.next()) {
AcceptBean bean = new AcceptBean();
bean.setFirstName(rs.getString("FirstName"));
bean.setLastName(rs.getString("LastName"));
bean.setVillage(rs.getString("Village"));
bean.setSonOf(rs.getString("SonOf"));
bean.setDistrict(rs.getString("District"));
list.add(bean);
}
// list.add(objBean);
System.out.println("list vlues in servelet" + list.get(0));
System.out.println("list detials inserted");
request.setAttribute("list1", list);
ServletContext context = getServletContext();
RequestDispatcher rd = context.getRequestDispatcher("/Report.jsp");
System.out.println("request dispatched");
rd.forward(request, response);
这是我的jsp代码
<display:table name="requestScope.list1" >
<display:column property="firstname" title="First Name"></display:column>
<display:column property="lastname" title="Last Name" ></display:column>
<display:column property="sonof" title="Father's Name" ></display:column>
<display:column property="district" title="District" ></display:column>
<display:column property="village" title="Village" ></display:column>
</display:table>
错误异常:[.LookupUtil] 在对象类型“ColdStorage.AcceptBean”中查找属性“firstname”时出错。原因:类'class ColdStorage.AcceptBean'上的未知属性'firstname'