• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Action working with arraylist

 
Jayasri Alaparthi
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I am following struts framework in my project, where I am using dataaccessobject and retrieving the array list


HttpSession session = aRequest.getSession();
ArrayList box = new ArrayList();
String scenId = (String) session.getAttribute(Names.ScenId);
ProductSelectionDAO dao = new ProductSelectionDAO(scenId);
ArrayList box = dao.getProducts();
bean = new ActionForm(box[0]);
aRequest.setAttribute(Names.LeftCol, bean);
bean = new ActionForm(box[1]);
aRequest.setAttribute(Names.RightCol, bean);


Please let me how I have to iterate the colums values in jsp, and how far the above code works.


Thanks,
SCJP 1.4
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic