【发布时间】:2013-09-05 03:29:48
【问题描述】:
Map<String, List<OfferBean>> map = new HashMap<String, List<OfferBean>>();
List<OfferBean> al=new ArrayList<OfferBean>();
OfferBean of=null;
sql="select * from catgory";
ps1=c.prepareStatement(sql);
ps1.execute();
rs=ps1.getResultSet();
if(rs.next())
{
System.out.println("inside loop of if");
sql="select * from catgory";
ps1=c.prepareStatement(sql);
ps1.execute();
rs=ps1.getResultSet();
while(rs.next())
{
of=new OfferBean();
System.out.println("inside loop of while");
of.setCategory(rs.getString("catgoryname"));
al.add(of);
}
map.put("key", al);
我想使用两个ArrayList 两个ArrayList 我将通过使用键放入HashMap,我想传递到jsp 侧的jsp 侧我想使用@987654327 检索数据@如何reteive它请任何人帮助我
【问题讨论】:
标签: java jsp map arraylist jstl