File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "cookies" Watch "cookies" New topic
Author

cookies

Kranthi Kondapaka
Ranch Hand

Joined: Sep 17, 2007
Posts: 31
hi,
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
response.addCookie(c);

}
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
Rancher

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: http://aspose.com/file-tools
 
subject: cookies
 
Similar Threads
setMaxAge(0) doesnt delete cookie?
cookie.getMaxAge reads -1
about Cookies
how to make remeber me service
Cookies not persistent ... how can it be?