This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes Testing for cookie disabled browser - netscape problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Testing for cookie disabled browser - netscape problem" Watch "Testing for cookie disabled browser - netscape problem" New topic
Author

Testing for cookie disabled browser - netscape problem

Sanjay Anand
Ranch Hand

Joined: Apr 03, 2001
Posts: 42
Dear gurus and colleagues,
I have a need to test whether cookies are enabled or not in the browser. Setting a cookie and then getting it did not work because the cookie seems to be visible only 'downstream' from the servlet. So looking through the ever so useful JavaRanch archives I found a solution.
It works for Internet Explorer but not for Netscape (no matter which version).
Any ideas?


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16020
    
  20

That's OK, but only if you've already created a session! The best way I know is to snoop out the browser's support in the site's home page so that when they go to log in, it all comes down and you can store it in the session. I do this not only for cookies, but detecting support for Java, JavaScript, etc.


Customer surveys are for companies who didn't pay proper attention to begin with.
Sanjay Anand
Ranch Hand

Joined: Apr 03, 2001
Posts: 42
Please explain how I might do that?
Thanks in advance.
Sanjay
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Testing for cookie disabled browser - netscape problem