You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by philguillard <ph...@gmail.com> on 2006/01/05 04:25:50 UTC
cookie setDomain
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 (to be able to keep the session
with subdomains pointing to the same application context). By default
the Domain is null and the browser is setting it with the full domain name.
addCookie() in Response.java or HttpResponse.java are not used when i
sign in,
I tried to change org.apache.cocoon.environment.http.HttpCookie, but
clearly this is no way to do this there. 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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org