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

Question on Cookie

Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 507


Hi Ranchers,

Statement: A cookie stores information about the server on client side(browser.)

Scenario :With the above Statement being true, Suppose assume the Client(browser) rejects to create a cookie on client side,how will the server know that client has rejected to create a cookie on client side.
How do we handle this scenario in case of Cookies.

Please help me out to handle the above scenario.

Help provided will be highly appreciated.

--
Deepak Lal


When The Going Gets Tougher,The Tougher gets Going
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61768
    
  67

If the cookie is not created on the client, the only way that the server can know is to try to read it.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Check if cookie is present in HttpServletRequest#getCookies() of subsequent request or not.
Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 507

Hi Bear,
Can i have a sample logic for the same.Im trying to work on this for quite a while sometime but finding it difficult to accomplish.

If you could provide me with a Sample code logic ,it will be appreciated in order to understand the concept better.

--
Deepak Lal
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
You missed my reply?
Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 507



Awesome Reply Bauke Scholtz and Bear.

Thanks Ranchers for your valuable input/answers.



Thanks for the valuable input provided.

--
Deepak Lal

Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
You´re welcome.

In the future, please omit those unnecessary colors in your posts.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on Cookie