Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in showing nested lists in jsp page

 
dhaval tamboli
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using struts2.

My design is like I have Araaylist which has another arraylist in it.

i.e.
In My action class I do have



and GenericModel contains



and OptionModel contains



I have eneterd all information correctly but I am not able to show them on JSP in way I want.

my JSP Page contains



I want to show all information contained in previewList, I can see Question_Name and other but I am not sure how to access information from OptionModel list.
Above code is not working (just the oList part) I am not able to see its contents.

please give your thoughts to solve my problem

Thanks,
Dhaval

 
Ankit Garg
Sheriff
Posts: 9597
36
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The s:iterator tag pushes the iterated element on the top of the value stack, so this code should work
 
dhaval tamboli
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ankit,

I know I am doing right, but I am not able to get anything in jsp. However I tried to see in action class if I am loading it right or if there is any other problem but there I can see each elements in order by get methods.

Here in JSP page, I tried to see its size but even that also not showing anything.

I tried

but still nothing. I dont know what to do next
please help me

Thanks
Dhaval
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!