webtier@glassfish.java.net

default cookie domain of jsession id cookie

From: <webtier_at_javadesktop.org>
Date: Sat, 10 Jan 2009 03:53:55 PST

Hello,

I am trying to modify default cookie domain of the jsessionid cookie.

namely I have: www.mysite.com and subdomains that are dynamic, such as username.mysite.com. I have done some urlrewriting and all the domains *.mysite.com
goes to the same ip.

it works nice, but while going into username.mysite.com a new session is started, since the domain is different. thus I want to be able to set the domain of the cookie to .mysite.com

I have done the following, but no luck. (btw, I am on gf3 prelude)

from web.xml

   <session-config>
        <session-timeout>
            30
        </session-timeout>
        <cookie-properties>
            <property name="cookieDomain" value=".mysite.com" />
        </cookie-properties>
    </session-config>
[Message sent by forum member 'cambazz' (cambazz)]

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