|
session object
HI All
I have created an object as follows:
package cart;
public class CartItem implements java.io.Serializable
{
private static int StockID;
private static String ProdName;
private static int price;
private Vector Items;
public CartItem(int StockID, String Name, int pPrice)
{
StockID = StockID;
ProdName = Name;
price = pPrice;
}
public ShoppingCart()
{
Items = new Vector(StockID, Name, Price);
}
public String getName()
{
return ProdName;
}
public int getStockID()
{
return StockID;
}
public int getPrice()
{
return price;
}
}
Does anyone know if that the vector object is
a) correct
b) can it now be passed to the session using
cart.setAttribute(product, Items);
Thanks to all
|