show cart in shopping cart

Hi friends I am very new to jsp and I have to create a shopping cart . now i have done till add to cart now I have to do show cart now in the following steps I'll tell u what I wanna do : 1. add to cart : to store the book id in a vector .. 2. show cart : when somebody say show cart I wanna select the all products for which I have the id stored in a vector

Now I do not know how to achieve show cart functionality ... I 'm attaching my jsp code and my cart bean so guys pls help me out in making the show cart working pls ...... and do tell me if i need to working with set and get method in my cart file

Hi Preeti, I would suggest u to use useBean approach, instead wht u have done.. bec it's very simple to achieve wht u want, by that approach.. If u want i can send the codes.. If u r particular abt this approach, i think i need more time to trace the problem.. Saran

i've already worked on a similar situation . i've userd the same variable's as you have and have used beans with jsp .. the idea is to store all the items into a vector and call the vector into the jsp .....when you get all the items into jsp you can get them by using the loop and in that loop you can declare the same amount of checkboxes .....the next step would be to select the items and get them in your cart ....you'll be passing just one(1)value to the cart page (it can be any value ...may be the id number i.e:- 1,2, 5)...so 1 , 2 , 5 will be passed to the next page that is the cart page . Once you get the id numbers you can get all the info corresponding to the id numbers and for that you have to write a function :--- public classname getAll(int idumber) { return (classname)items.elementAt(idnumber); }