aspose file tools*
The moose likes Servlets and the fly likes adding more then one element to the vector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "adding more then one element to the vector" Watch "adding more then one element to the vector" New topic
Author

adding more then one element to the vector

Preeti Sikri
Ranch Hand

Joined: Mar 01, 2001
Posts: 30
Hi guys
Actually I am adding a integer to my vector which is coming as a parameter from the url but what I want is to show the same vector on the same page but what problem I'm facing is it is showing me only one element in the vector even if I add a lot of data to my vector pls tell me what cld be the problem :
my code is as follows :
dis.jsp:----

and my bean is as following through this bean only I'm adding elements in the vector
package shop;


pls help me out I know the problem is in the vector ..
any help wld be great
Thanks in advance
Regards Preeti
Added the UBB code tag http://www.javaranch.com/ubb/ubbcode.html for readability--Carl
[This message has been edited by Carl Trusiak (edited March 07, 2001).]
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
The problem isn't with vector, it how you are using cart. Eveytime you call for the page, you create a new one so, it only shows the last one selected. There are plenty of examples of putting the cart into the session object and getting it from there each time.

------------------
Hope This Helps
Carl Trusiak


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Preeti Sikri
Ranch Hand

Joined: Mar 01, 2001
Posts: 30
cld u pls give me some sample of doing it that will be great ...
thanks a lot
Regards Preeti
Ashwin Desai
Ranch Hand

Joined: Jul 17, 2000
Posts: 124
Hi,
you could use the following:

Ashwin.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: adding more then one element to the vector