Re: cookie setDomain

2006-01-06 Thread philguillard

Bonsoir Jean-Baptiste,

Merci. De quelle maniere est-ce faisable?
J'ai renomme ma question qui etait Meme session sur plusieurs domaines 
qui m'a permis de tirer ces conclusions :
- Comme j'utilise auth-framework et que je stocke des elements dans la 
session, je ne me vois pas tout readapter pour un tomcat realm ou 
solution SSO comme CAS.
- Mes subdomains pointent via http mod_rewrite sur le meme cocoon meme 
context, c'est pour cela je pensais a gerer le domain du cookie via cocoon
- Je ne veux/peux pas utiliser la session sans cookie via url-rewrite 
transformer
- Il est bien probable que ce ne soit pas faisable sur cocoon, et j'ai 
deja recu un commentaire la dessus, mais ne comprenant pas le pourquoi 
et n'ayant pas d'autre solution... je voudrais continuer a y croire ...


Phil

PS: Desole pour le mail en anglais

Jean-Baptiste Quenot wrote:


* philguillard:

 


Is it possible  (or impossible) to set the cookie  domain at the
time (or after) the cookie creation?
   



S'il s'agit du cookie de  session, c'est au servlet container (par
exemple Tomcat) de le faire, pas à Cocoon.
 




-
Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/
Pour vous desinscrire : mailto:[EMAIL PROTECTED]
Autres commandes : mailto:[EMAIL PROTECTED]



cookie setDomain

2006-01-05 Thread philguillard

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cookie setDomain

2006-01-04 Thread philguillard

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:[EMAIL PROTECTED]
Autres commandes : mailto:[EMAIL PROTECTED]



cookie setDomain

2005-12-28 Thread philguillard

Hi all,

Is there a way to remove www. or the domain prefix from the session 
tracking cookie domain with some modification on the cocoon servlet?
From now i tried to modify the HttpCookie class with a 
setDomain(mydomain.com) but this doesn't seem to have any effect.
On my browser, all cookies don't have the www. prefix on the domain 
value, but cookies from my coocon app have it.
I use http+tomcat, in case some ServerName directive or something could 
help too...
If not, is it possible to extend the addCookie or something with some 
javascript client on the browser?
(I absolutely need that feature to maintain session between subdomains 
that point to the same cocoon app..)


Regards,

Phil

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]