I need to display dynamic data populated from database.Basically its a question answer data.Some time I need to display 10 question and answers and some time more than that based on the query. How to do this and display in JSP page.
I am using Struts 1.4 .
Just a quick question. When did we come up with struts 1.4???
And as for your requirement. Retrieve the questions and answers in a List. Preferably create a POJO structure like this:
Now once you retrieve the questions with the correct mapped answers send a List of questions into the JSP. Then assuming you are using struts (1.x) use a nested logic:iterate to actually display the questions and the answers.