Hi

I'm using commons httpclient to perform a server side request, triggered by
a client (a real browser).
Once the server side request is done, I'm copying the server client cookies
to the client one using response.addCookie(servercookie) : this works as
expected, my client browser receives the cookies.

However, when this client browser performs another request (same page, same
domain), when I display its cookies from its HttpServletRequest (so the
Cookie is not a commons httpclient one, it's a javax.servlet.http.Cookie),
then cookie.getDomain() and cookie.getPath() are always null ; but
cookie.getName() and cookie.getValue() are ok.

I understand why domain and path could be "treated as null", because if I
receive the cookies name and value, then it means they were transmited for
the correct domain and path, but this still puzzles me : why is
javax.servlet.http.Cookies exposing getters for domain and path if the
returned value is always a null ? Tested on jetty and tomcat.

Hope someone can enlighten me :)

thanks !
laurent


-- 
<a href="http://in-pocket.blogspot.com";>http://in-pocket.blogspot.com -
Mobile world, technology and more</a>

Reply via email to