aspose file tools*
The moose likes Servlets and the fly likes request.getCookies(); is not returning all the cookies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "request.getCookies(); is not returning all the cookies" Watch "request.getCookies(); is not returning all the cookies" New topic
Author

request.getCookies(); is not returning all the cookies

Fawad Ali
Ranch Hand

Joined: Dec 28, 2009
Posts: 112
Hi All,
I have a strange problem. I try to get all the cookies by the following code


But its returning only one cookie and that is of JSessionId. I have confirmed that the cookie exists on the client side but somehow the function is not getting it. BTW at first the code worked fine for me but then later on it stopped working. Any ideas on this.

Thanks in advance.


Regards, Fawad Ali.
Software Engineer, Stafona Inc. - My Blog
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61657
    
  67

Are the cookies for the same domain within which the servlet is executing?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

Sometimes browsers have intelligence to block cookies, as it cannot distinguish between safe and unsafe ones. See if your browser has the option to turn ON to accept cookies.


S.D. MADHAN
Not many get the right opportunity !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: request.getCookies(); is not returning all the cookies