users@glassfish.java.net

Re: GlassFish v3 JSESSIONID Multiple Subdomains and TLDs

From: <glassfish_at_javadesktop.org>
Date: Sun, 11 Jul 2010 05:51:27 PDT

You have two ways I know of:
1. Programmatically: http://download.oracle.com/docs/cd/E17410_01/javaee/6/api/javax/servlet/SessionCookieConfig.html#setDomain(java.lang.String)
2. in sun-web.xml: http://docs.sun.com/app/docs/doc/821-1750/beash?l=en&a=view
add a segment such as this to your sun-web.xml:[code]
<sun-web-app ...>
   ...
   <session-config>
      <cookie-properties>
         <cookieDomain>.example.co.uk</cookieDomain>
      </cookie-properties>
   </session-config>
</sun-web-app>[/code]
HTH,
Opher.
[Message sent by forum member 'ophers']

http://forums.java.net/jive/thread.jspa?messageID=477285