This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes How to populate a string array in a html table in jsp? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to populate a string array in a html table in jsp?" Watch "How to populate a string array in a html table in jsp?" New topic
Author

How to populate a string array in a html table in jsp?

sheryl merchel
Greenhorn

Joined: Apr 05, 2011
Posts: 4
Hi,
I m little new to struts..
I want to create a html table like this

slno Question Options No of Answers
________________________________________
1 aaaa Yes 3
No 6
________________________________________
2 bbbb True 2
False 7


(Table is not drawn properly.Here Yes and No are the fields that come under the column 'Options' for Question with slno 1, with '3' and '6' as their respective number of answers.Likewise True and false are the options for Question 2, with '2' and '7' as their respective number of answers)

Here each row is an item of a list and the options for each question is contained in a string array which itself is an element of the list.
How can i populate this string array values inside the table.

I have something like this now,but its not working.
jsp :


Here questionValues is the string array and QuestionsList is a list.

FormDetails class:



Also please suggest any alternative way better than this to do this
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to populate a string array in a html table in jsp?
 
Similar Threads
Logic:iterator issue in Struts 1.3.10
java.lang.IllegalArgumentException: argument type mismatch
doubt in Struts application
Logic Iterate
javax.servlet.ServletException:javax.servlet.jsp.JspException: Cannot find bean: "riga" in any scope