Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cookie detection in Java

 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I can't believe there is no Java API to detect whether or not a client accept cookies.
The only solution I see is to write a cookie and then to read it to check it has been accepted.
Am I right ?.
Please tell me there is a API I did not see because I only slept 2 hours this night !!
[This message has been edited by Bill Bailey (edited November 14, 2001).]
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Servlet API allows you to manipulate cookies !
HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Valentin,
I'm not sure to understand your answer. (only slept 2 hours that night, remember )
Is there a kind of isCookieAccepted() method somewhere ?
Or am I compelled to code it ?

Originally posted by Valentin Crettaz:
The Servlet API allows you to manipulate cookies !
HIH

 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill, the only way that I know of to determine if the client accepts cookies is, like you said, send a cookie to the client and then try to read it back.
------------------
Bosun
SCJP for the Java� 2 Platform
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Incredible !!
However, it's quite a simple a useful functionality.
thanks anyway for your answers

Originally posted by Bosun Bello:
Bill, the only way that I know of to determine if the client accepts cookies is, like you said, send a cookie to the client and then try to read it back.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic