Hi, I am trying to fetch data and send to bean and then iterate using TreeMap in jsp can any one please help...I am lost

Bean bn = new Bean();

while (rs.next())
      {

      s2id=   rs.getString("ID");
      s2fname=   rs.getString("FirstName");
      s2lname=   rs.getString("LastName");
      s2product=  rs.getString("Product");
      s2option=  rs.getString("Product Option");

//Add records into data list
 ArrayList arl= new ArrayList();
bn.setFirstname(s2id);
bn.setFirstname(s2fname);
bn.setFirstname(s2lname);
bn.setFirstname(s2product);
bn.setFirstname(s2option);
arl.add(bn);

}

use a <jsp:useBean to instantiate the bean on the jsp page

<jsp:useBean id="form" class="MyForm" scope="session"></jsp:useBean>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.