I've met that kind of problem, but I didn't slove it.
but without getDomain method, it'll work well.

===========================
Korea Telecom Chungbuk office
Chaehwan Im
[EMAIL PROTECTED]
===========================


-----���� �޽���-----
���� ���: Hector Fabio Meza Martinez <[EMAIL PROTECTED]>
�޴� ���: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
��¥: 1999�� 4�� 17�� ����� ���� 1:36
����: getCookies doesn't get cookies


>Hi.
>I'm trying to implement a servlet that gets cookies from the client, the
>following is the code i'm using:
>
>        Cookie[] cookies = req.getCookies();
>                if (cookies != null)
>                {
>
>      for(int i=0; i<cookies.length; i++)
>      {
>        String n = cookies[i].getName(),
>         d = cookies[i].getDomain();
>         if(n != null &&  d != null )
>         {
>                out.println(n);
>                out.println(d);
>         }
>      }
>
>So far, i'm just trying to print them back to the user. The problem is that
>getCookies is returning null, but the cookies.txt file has text, so there
>should be cookies. Is there any mistake with the code? or maybe the problem
>is because i'm testing the servlet with servletrunner?
>
>Any help would be appreciated
>
>Hector
>
>___________________________________________________________________________
>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
>

___________________________________________________________________________
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