怎么用JSTL循环输出bean里面的值 50
publicclassLineBean{privateStringnum;privateStringstop1;privateStringstop2;privateStr...
public class LineBean {
private String num;
private String stop1;
private String stop2;
private String stop3;
private String stop4;
private String stop5; 省略后面的
List<LineBean> list = new ArrayList<LineBean>();
while(rs.next()){
LineBean line = new LineBean();
line.setNum(rs.getString(1)); //有没方法循环赋值到stop里?
line.setStop1(rs.getString(2));
line.setStop2(rs.getString(3));
line.setStop3(rs.getString(4));
line.setStop4(rs.getString(5));
list.add(line);
}
request.setAttribute("list", list);
然后我在另外一个页面getAttribute 怎么循环输出每个stop的值? 展开
private String num;
private String stop1;
private String stop2;
private String stop3;
private String stop4;
private String stop5; 省略后面的
List<LineBean> list = new ArrayList<LineBean>();
while(rs.next()){
LineBean line = new LineBean();
line.setNum(rs.getString(1)); //有没方法循环赋值到stop里?
line.setStop1(rs.getString(2));
line.setStop2(rs.getString(3));
line.setStop3(rs.getString(4));
line.setStop4(rs.getString(5));
list.add(line);
}
request.setAttribute("list", list);
然后我在另外一个页面getAttribute 怎么循环输出每个stop的值? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询