• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Iterating through Vector

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

I have vector contains vector, this is code

Vector outsideVector ov = new Vector();

Vector insideVector iv = new Vector();
iv.add("one");
iv.add("two");

ov.add(iv);

iv =new Vector();
iv.add("three");
iv.add("four");

ov.add(iv);

and i m setting outside vector to request object
request.setAttribute("data", ov);

now i want to display value like this

Last Name First Name
one two
Three four


so how can i extract his value in jsp using <logic:iterate> tag

i am stuck here.....please help me
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<logic:iterate name="outsideVector" id="insideVector" type="java.util.Vector" scope="request">
<br>
<logic:iterate name="insideVector" id="element">
<bean:write name="element" />  
</logic:iterate>
</logic:iterate>

This assumes that in the action class, you have the statement:

request.setAttribute("outsideVector", outsideVector);
[ May 03, 2005: Message edited by: Merrill Higginson ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic