Odi,

I have been thinking your request over for quite some time already. I
tend to lean toward providing this kind of functionality as a part of
URI related utilities (with URIUtil being on my mind) rather than from
the Cookie class. I am a bit reluctant to tightly couple Cookie class
with URI or URL classes just because of a few convenience methods.

Let me know what you think about it

Cheers

Oleg


On Mon, 2002-12-16 at 18:03, Ortwin Gl�ck wrote:
> 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
> 
> 
> --
> To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
> 


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

Reply via email to