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
我想使用jstl
如何检索数据来检索数据请任何人帮助我