This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Servlets and the fly likes cookies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "cookies" Watch "cookies" New topic


Kranthi Kondapaka
Ranch Hand

Joined: Sep 17, 2007
Posts: 31
this is my method
private void deleteCookie(HttpServletResponse response, String cookie) {
Cookie c = new Cookie(cookie, null);
c.setMaxAge( 0 );
c.setPath( "/" ); // for all subdirs

I am calling it from my action class.
After executing it also,m unable to delete the cookie,i mean unable to set the maxAge=0;

anyone help me out
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

I don't understand. Why not?
Ajith Prasad
Ranch Hand

Joined: Aug 22, 2006
Posts: 66
It is working perfectly with IE
I agree. Here's the link:
subject: cookies
jQuery in Action, 3rd edition