aspose file tools*
The moose likes Struts and the fly likes Vector with bean:write tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Vector with bean:write tag" Watch "Vector with bean:write tag" New topic
Author

Vector with bean:write tag

vikramjit sihint
Greenhorn

Joined: Aug 11, 2004
Posts: 3
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.
prabhat kumar
Ranch Hand

Joined: Apr 11, 2001
Posts: 114
use collection instead of Vector.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Vector with bean:write tag
 
Similar Threads
Problem with logic:iterate tag
display selective value from VECTOR
Why can't I get the Vector value in jsp(ModalDialog)?
Creating multiple arrays at run time?
a FreeMarker question