Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

adding more then one element to the vector

 
Preeti Sikri
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Preeti Sikri
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cld u pls give me some sample of doing it that will be great ...
thanks a lot
Regards Preeti
 
Ashwin Desai
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
you could use the following:

Ashwin.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic