On Fri, 8 Sep 2000, Nic Ferrier wrote:

> >>> Naveen Chandra <[EMAIL PROTECTED]> 08-Sep-00 12:33:35 AM >>>
>
> >I could set the domain explicitly and add the cookie
> >to my response Object but when I retrive the domain
> >using getDomain() method of Cookie object using
> >getCookies() method with request object I always get
> >null value.
>
> Hmmm... looks like it *might* be a bug.
>
> (this shows how often people use cookies for anything other than
> sessions - I have *never* heard of this before!)
>
> When you first create the cookie can you get the domain then?
>
> It could be that the browser isn't sending the domain part of the
> cookie to the servlet engine. You could check that by looking at the
> request as it comes (with a packet sniffer) in or by retrieving the
> header like so:
>
>   public void doGet(....
>   {
>      String cookies=request.getHeader("Set-Cookie");
>      System.out.println(cookies);
>    }
>
> It should be very clear if the domain is being transmitted to the
> server.

Actually, I believe it is not, and that may be the problem here.  I
seem to recall from Jason Hunter's book (which I don't have handy, so
I can't verify) that only a limited subset of the available
information about cookies is available to the server.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to