Sharing Cookies Between Sub Domains in java?
I was able to do it using the following code:
Cookie cookie = new Cookie("myCookie", "myValue");
cookie.setMaxAge(60 * 60);
cookie.setDomain(".myserver.com");
When you set the cookies from sub1.myserver.com, you must specify a domain of "myserver.com" -- this will instruct the browser to send the cookies to myserver.com and all subdomains.