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.