Thread: cookies

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    chennai, tamil nadu, INDIA
    Posts
    27
    Rep Power
    0
    how to do maintain cookies in servlets?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    35
    Rep Power
    14
    class javax.servlet.http.HttpServletResponse has a method addCookie, which takes a Cookie object as it's argument (javax.servlet.http.Cookie). The Cookie constructor takes two Strings as arguments, which are the cookie's name and value, respectively. You can call addCookie multiple times to add multiple cookies.

    Success, Ton

IMN logo majestic logo threadwatch logo seochat tools logo