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);
Run Code Online (Sandbox Code Playgroud)
我想用两个ArrayList两个ArrayList我会把里面HashMap用钥匙,我想传递给jsp在一旁jsp一边我想用检索的数据jstl是如何reteive PLZ任何一个可以帮助我