tags:

views:

100

answers:

3

HI,

Is there any way I can find whether the cookies are disabled or not on the client browser. I have seen some posts saying to find using redirect URL, but there is no code how to do that . Can anyone please help me with a sample code to check this.

Please note that I want this to be done using Java only (no javascript please)

Thanks! Srinivas

+1  A: 

you could set a cookie on the startsite and try to read it on the following sites, if your cookie can't be read the user has either disabled them or has deleted your cookie

Nikolaus Gradwohl
A: 

http://stackoverflow.com/questions/318938/how-do-you-test-if-cookies-are-enabled-in-java-j2ee/319102#319102

Klark
That's a good example although it's unnecessarily porting `doGet()` into `doPost()`. Further, I (among many others here) am not a fan of answers containing only links. Try to word it in your own words, else just post a comment link or use it as close reason :)
BalusC
I just wanted to state that literally same question has already been asked, so there is not actually any need for further discussion.Thanks for the comment btw, I will try to write more info next time.
Klark