This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Accessing an element of a collection in logic iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Accessing an element of a collection in logic iterate" Watch "Accessing an element of a collection in logic iterate" New topic
Author

Accessing an element of a collection in logic iterate

phil gibbs
Greenhorn

Joined: Jan 22, 2002
Posts: 2
I have a Collection of objects passed to a JSP. Elements of each object are rendered within an HTML table in the page. I need to create a scripting variable from a specific element as I iterate over the Collection. I think that I can use the bean efine tag to do this? I need to access the value to do some further processing so that I can render the output from this processing on the table row element.
Mark Blackledge
Greenhorn

Joined: Nov 04, 2005
Posts: 5
Can you use EL? From within the logic iterate just access your item with something like ${item.name}. You can put that right in the script.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing an element of a collection in logic iterate
 
Similar Threads
logic iterate
collection query
using array list
Why does SortedSet class has no .get(location) method?
Design question