This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General 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