This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of AWS Security and have Dylan Shields on-line!
See this thread for details.
Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to knw if client rejects Cookies ?

 
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
How can we get to knw for sure dat client rejects cookies

Well , client might rejects cookies if :
- getSession(false) returns null , dat means no HttpSession object has been created , so client might be rejecting cookies .
- isNew() always returns true

I knw , session-tracking is web-container dependent , and it might use url-rewriting if client reject cookies .
But our servlet can always explicitly use cookies . So is any sure way to knw if client reject cookies ?
Wot i think is :

  • Make a cookie and send it to client
  • Make client call da same servlet again
  • check if same cookie comes wid this request or not

  • is it right way ? any other idea?

    ------------------
    Gagan (/^_^\) SCJP2
    Die-hard JavaMonk -- little Java a day , keeps u going .
 
Gagan Indus
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone ? any views plz
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if this would work, but what about calling request.isRequestedSessionIdFromCookie() and request.isRequestedSessionIdFromURL() for determining whether client is using cookies or URL for session info?
 
You guys wanna see my fabulous new place? Or do you wanna look at this tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic