Actually, I have found the Bug!!!
The problem is this.
The user agent (Netscape 4.6) is sending me 2 cookies.
One called "SITEFOO" value "ID=abcdefg"
and another, the session cookie with value "somevaluefof"
Now, req.getCookies() returns a ZERO LENGTH array because the value in the
1st cookie (ID=abcdefg) contains an equals sign!!! (=)
Now, If i shutdown the browser and I edit the cookies file and change the
cookie value to ID1abcdefg (ie, I replace the = sign with a 1)
EVERYTHING WORKS fine!
So, the bug is in req.getCookies()
--Olu E.
> -----Original Message-----
> From: Chris Pratt [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, June 23, 1999 10:58 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Zero length array!
>
> Not according to the documentation. It doesn't say anything about
> getCookies returning null, so I'd assume it should return a Zero Length
> Array.
> (*Chris*)
>
> ----- Original Message -----
> From: Emuleomo, Olu (PME) <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 23, 1999 3:49 PM
> Subject: Zero length array!
>
>
> > Hi,
> >
> > Does anybody know why req.getCookies() returns a zero length array?
> > ie. Cookies ck[] = req.getCookies();
> >
> > ck.length == 0 !!
> > I am trying to list the cookies in a HttpServletRequest.
> > If there are no cookies present, shouldnt it return null?
> >
> > --Olu E.
> >
> >
> > > -----Original Message-----
> > > From: Emuleomo, Olu (PME) [SMTP:[EMAIL PROTECTED]]
> > > Sent: Wednesday, June 23, 1999 3:40 PM
> > > To: 'A mailing list for discussion about Sun Microsystem's Java
> Servlet
> > > API Technology.'
> > > Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
> > > Subject: A bug in the session API?
> > >
> > > Hi,
> > >
> > > I believe this may be a bug in the session api.
> > > req.getSession(true)
> > >
> > > creates a cookie with name "session", value =
> [SIW3DZIAAAAAFET3MEFAAAA]
> > > but the domain is NULL and the path is NULL.
> > > Now, this is not a problem if you dont have cookies with the domain of
> > > your
> > > server
> > > (the server that generated the cookie) already stored in your cookies
> > > file.
> > > However, if you do, the user agent i.e. Netscape/IE does not send the
> > > cooie
> > > called
> > > "session" to your servler, so the servlet ALWAYS THINKS YOU DONT HAVE
> A
> > > SESSION
> > > and creates a new one!
> > >
> > > Sun staff, can you verify this? I believe this may be a bug since I
> expect
> > > the domain to be ".foo.com" or
> > > something along those lines, but NOT null.
> > >
> > > --Olu E.
> >
> >
> __________________________________________________________________________
> _
> > 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
___________________________________________________________________________
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