Hi
I have the following class for shopping cart. Its working fine in storing the objects until i go to submit than i cannot access an Enumeration of cartItems. here is how the class looks like.
class Cart{
private
String orderNo;
private Enumeration items;
public void setItems(Vector vc){
this.items= vc.elements();
}
public Enumeration getItems(){
return this.items;
}
}
The vector in setItems is storing CartItem Objects.first form submits to CartServlet, and i take parameters in it, create Cart Object and setOrderNo() on that object, than put it in the session. The user is than forwarded to CartItemsSelection page (where i can easily retrieve the session object). The user clicks on the items needed and submits to CartItemServlet, which takes the params, create a vector of CartItem objects after that retrieve the session cart object and call setItems(vector) on it, the user is taken back to the main OrderPage where the whole order is shown for confirmation.Still on main page i can access the complete Cart Object along with items enumeration in it.
Now when the user submits the record to the next
servlet i can access the plain variable from session like orderNo but the getItems() returns a null enumeration.
Which i just accessed in last
JSP page and have made no changes to the session object.
I will really appreciate if someone can help me out why this is happening.
Thanks and Regards
Gul