You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Paolo <go...@tiscalinet.it> on 2011/02/02 04:38:08 UTC
how to set cookie domain?
Hi,
I want add a cookie, and I saw on this site, how to do this.
https://cwiki.apache.org/WICKET/dealing-with-cookies.html
((WebResponse)RequestCycle.get().getResponse()).addCookie(new Cookie("cookieName", "cookieValue"));
but I need to specify also the domanin.
I need something like this PHP code, but for Wicket:
ini_set('session.cookie_domain', '.otherdomain.com');
thank you!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: how to set cookie domain?
Posted by Pepijn de Geus <pd...@me.com>.
Cookie itself can handle that: Cookie#setDomain(String).
For session cookies, you can use the sun-web.xml, at least in GlassFish:
http://download.oracle.com/docs/cd/E19776-01/820-4502/6nfvbc8id/index.html
On 2 feb 2011, at 04:38, Paolo wrote:
> Hi,
> I want add a cookie, and I saw on this site, how to do this.
>
> https://cwiki.apache.org/WICKET/dealing-with-cookies.html
>
> ((WebResponse)RequestCycle.get().getResponse()).addCookie(new Cookie("cookieName", "cookieValue"));
>
> but I need to specify also the domanin.
>
> I need something like this PHP code, but for Wicket:
>
> ini_set('session.cookie_domain', '.otherdomain.com');
>
> thank you!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org