This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes Problem in showing nested lists in jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem in showing nested lists in jsp page" Watch "Problem in showing nested lists in jsp page" New topic
Author

Problem in showing nested lists in jsp page

dhaval tamboli
Greenhorn

Joined: Aug 02, 2010
Posts: 25
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

Joined: Aug 03, 2008
Posts: 9400
    
  20

The s:iterator tag pushes the iterated element on the top of the value stack, so this code should work


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
dhaval tamboli
Greenhorn

Joined: Aug 02, 2010
Posts: 25
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
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Problem in showing nested lists in jsp page
 
It's not a secret anymore!