how to store an ArrayList<string> into cookies?
hi, im currently deisgning a shopping basket and have set it up so that during the session it stores the product code and console type in a an arrayList <String> and displays the full details of the game with these two values from the jdbc.
The problem i have is how do you go about storing these as cookies? i have it set up to store the sessionID, productCode, consoleType, userName in session and longLived cookies.
now, after the user has gone through the checkout when storing the cookies from the ArrayList<string> its adds a new set cookies each time for all the values. so if the user has bought 2 items in effect will produc 8 cookies, is this the correct way of doing it? i imagine not because theres is a max number of cookies of 20 i think? so you would set up an array of productCodes, consoleType etc then send them in as Strings to each cookie?
also from this, after the cookies are stored and the user has registered how do you go about retrieving the items releveant to that session and user when they next log in?
any help would be much appreciated cheers