• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Not able to iterate through a bean property of type Array List

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all im new to Struts...

Please tell me if there are any blunders in the code below and also the solution for my problem

Im working with Struts 1.2
I have to display the Employee names for that i used a DAO that returns the ArrayList
which is set by the Action Class to the Bean Property of type ArrayList

I have to access this bean property in "emp.jsp" and display the values in the arraylist that holds the employee names the problem is im not able to iterate thorugh the Array List

Here goes my code...

EmpDAO.java




EmpForm.java




EmpAction.java



emp.jsp




Thank you,
Shanthi Naidu
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can add "type="java.lang.String"" to " <logic:iterate id="result" name="empForm" property="al"> ", and take a try.
 
shanthi naidu
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi thank you for the reply

I tried with that .. it is not showing any error but also not displaying any thing jus the message i have written "Successful..."
i have to display all the employee names on the jsp page...


can we do anything more with that?
 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic