This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • 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