• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What happens if a client rejects a Cookie

 
Fatema Moosa
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Bupjae ,

Thanks a lot for your reply!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic