Not able to iterate through a bean property of type Array List
shanthi naidu
Ranch Hand
Joined: Nov 13, 2008
Posts: 37
posted
0
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
posted
0
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: 37
posted
0
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...