This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff 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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP 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?