tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve jones <steve.jo...@netdecisions.co.uk>
Subject Cookies
Date Fri, 11 Feb 2000 16:28:56 GMT
Here is the code snippet:
    /**
     * This method stores the cookies for this user.
     */
    public static final void storeCookies(HttpServletResponse response,
ShoppingCart cart){
        System.out.println("Saving cookies " + cart.getId() + " with value "
+ cart.toString());
        response.addCookie(newCookie(cart.getId(), cart.toString()));
        response.addCookie(newCookie("ShoppingCart", cart.getId()));
        response.addCookie(newCookie("CartCount",
Integer.toString(cart.getNumberOfItems())));
        System.out.println("Saved cookie");
    }

It works fine under servletrunner with jskd2.1 all of the cookies are stored
and updated.  However under Tomcat only the last item (CartCount) is
actually being stored, the others are ignored.

Any ideas ?

Cheers

Steve


Mime
View raw message