• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cookie detection in Java

 
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
Put a gun against his head, pulled my trigger, now he's dead, that tiny ad sure bled
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic