aspose file tools*
The moose likes Servlets and the fly likes What happens if a client rejects a Cookie Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "What happens if a client rejects a Cookie" Watch "What happens if a client rejects a Cookie" New topic
Author

What happens if a client rejects a Cookie

Fatema Moosa
Greenhorn

Joined: Dec 31, 2008
Posts: 7
Hello,

Please could someone help me with the answer for this question -

A servlet or JSP attempts to set a cookie on the client system; however, the client rejects it.
Referring to the scenario above, how does the server know the cookie was rejected?
Choice 1 The browser raises a Java exception in the method that tried to set the cookie.
Choice 2 The browser explicitly rejects it, but with no other message.
Choice 3 The browser acts the same as if it had accepted the cookie, but it does not send it back.
Choice 4 The browser explicitly rejects it and sends an explanatory message to the server.
Choice 5 The browser explicitly rejects it and always sends a standard message to the server.
Bupjae Lee
Ranch Hand

Joined: May 14, 2007
Posts: 107
Your browser will ignore cookie quitely. It doesn't throw any exception, send error/warning message, or etc.

Instead, your Cookie instance will be always empty - just like new user come to your web application.
Fatema Moosa
Greenhorn

Joined: Dec 31, 2008
Posts: 7
Hello Bupjae ,

Thanks a lot for your reply!
 
 
subject: What happens if a client rejects a Cookie