hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Gl├╝ck <ortwin.glu...@nose.ch>
Subject Cookies: need more convenience
Date Mon, 16 Dec 2002 17:03:40 GMT
I am missing a simple way to generate the domain string for a Cookie 
from an URL.

I would like to have something like:
URL url = new URL("http://jakarta.apache.org/");
Cookie cookie = new Cookie(Cookie.getDomain(url, 2), COOKIE_NAME, 
"myvalue");

Cookie.getDomain(url, 2) would then return .apache.org (2 dots).
Cookie.getDomain(url, 3) would then return .jakarta.apache.org (3 dots).

Odi


Mime
View raw message