• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

adding more then one element to the vector

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

Ashwin.

 
What do you have to say for yourself? Hmmm? Anything? And you call yourself a tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic