• 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

Vector with bean:write tag

 
Greenhorn
Posts: 3
  • 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 class file with a Vector having 3 values.something like....
Vector v=new Vector();
v.add(1,"one")
v.add(2,"two")
v.add(3,"three")
this vector is called in the Formbean

public Vector getEthcontroller()
{
return v;
}
I the jsp page I am calling it as

<bean:write name="netfrm" property="ethcontroller"/>

My problem is I have to extract vlaues for the vector one by one and plcae it to some specific location on the jsp page.

How will I do it.
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use collection instead of Vector.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vikramjit,
Why are you storing those values in the Vector rather than as 3 separate fields?

While I agree that it is better to use Collection (since it is an interface), I don't see how it would help with this question.
 
reply
    Bookmark Topic Watch Topic
  • New Topic