• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

iterate Struts Tag Help Needed

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I have a JSP page, where i have display a report. the Reports has more column and data. So when I tried of displaying, I got a exception stating that the code is too long to compile. So I spited the pages into two. However I am using JSP action include including the child page in the parent page.

I am using struts iterate tag to iterate. I really don't know how I can pass the Nth
Object ever time to the child page. Here I am don�t know how take the n object from the current iterate in the parent page, then how can I sent that as an object to the action include JSP page (Child page).

I really appreciate for your help.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The logic:iterate tag places the bean exposed by each iteration in page scope. Normally this is fine as you generally use the bean within the same page. In your case, though, you'd want to put the bean in a wider scope such as request so that you can use it in a different page. You can do this with the bean:define tag. Here's an example:

In this example, the "other.jsp" can retrieve "requestScopedBean" from request scope and use it to display values.
[ June 26, 2007: Message edited by: Merrill Higginson ]
 
Abdul Kader
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a Lot Merrill, It really helped me to solve the issue.

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic