aspose file tools*
The moose likes Struts and the fly likes Not able to iterate through a bean property of type Array List Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Not able to iterate through a bean property of type Array List" Watch "Not able to iterate through a bean property of type Array List" New topic
Author

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

shanthi naidu
Ranch Hand

Joined: Nov 13, 2008
Posts: 39
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
Gui Liu
Greenhorn

Joined: Mar 21, 2010
Posts: 2
You can add "type="java.lang.String"" to " <logic:iterate id="result" name="empForm" property="al"> ", and take a try.
shanthi naidu
Ranch Hand

Joined: Nov 13, 2008
Posts: 39
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to iterate through a bean property of type Array List