cocoon-users-fr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From philguillard <philguill...@gmail.com>
Subject cookie setDomain
Date Wed, 04 Jan 2006 18:18:39 GMT
Hi,

Is it possible (or impossible) to set the cookie domain at the time (or 
after) the cookie creation? I use Portal block, thus Auth-framework, and 
i'd like to set the domain to ".mydomain.com" instead of 
"www.mydomain.com" for subdomain issues (be able to keep the session 
with subdomains on pointing to the same app context).

addCookie() in Response.java or HttpResponse.java are not used there,
I tried to change org.apache.cocoon.environment.http.HttpCookie, but 
clearly this is no way to do this here. Missing some java/servlets 
knowledge !

public final class HttpCookie
implements Cookie {

    private javax.servlet.http.Cookie cookie;

    public HttpCookie(String name, String value) {
        this.cookie = new javax.servlet.http.Cookie(name, value);
    }
    public HttpCookie(javax.servlet.http.Cookie cookie) {
        cookie.setDomain(".mydomain.com");
        this.cookie = cookie;
        this.cookie.setDomain(".mydomain.com");
    }

Regards,

Phil

---------------------------------------------------------------------
Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/
Pour vous desinscrire : mailto:users-fr-unsubscribe@cocoon.apache.org
Autres commandes : mailto:users-fr-help@cocoon.apache.org


Mime
View raw message