This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes change cookie value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Servlets
Bookmark "change cookie value" Watch "change cookie value" New topic

change cookie value

Amy Saari
Ranch Hand

Joined: Sep 13, 2007
Posts: 30
For those of you having trouble with this. Make sure you put the cookie on the response - even if you're just changing the value. And make sure you have the path correct - if you want the cookie sent on any request to that domain set the path as /. And then make sure you set the maxLength is you want your cookie to stay around after the session.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62113

Is there a question in there somewhere?

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3368

That's nice "A Saarii". Thank you

You have to update your display name so as to match with Ranch's Naming Policy. You may please have a look at the Naming Policy here.

You can update your name by editing your profile. It does NOT affect any of your earlier threads except the display name gets updated everywhere.

Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3368

Originally posted by Bear Bibeault:
Is there a question in there somewhere?

Bear, i dont know whether this is allowed or not.

It looked like as such he had some information to share.
I agree. Here's the link:
subject: change cookie value