permaculture playing cards
The moose likes JSP and the fly likes Logout user by deleting cookie Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Logout user by deleting cookie" Watch "Logout user by deleting cookie" New topic

Logout user by deleting cookie

Leonardo Pjetri

Joined: Dec 21, 2004
Posts: 29
here is how the cookie is detected

im trying to add a button, when clicked it kills the cookie, but so far no success
Gaurav Chhabras
Ranch Hand

Joined: Sep 21, 2005
Posts: 126
public void Cookie.setMaxAge(int expiry)

Specifies the maximum age of the cookie in seconds before it expires. A negative value ( -1 ) indicates the default, that the cookie should expire when the browser exits. A zero ( 0 ) value tells the browser to delete the cookie immediately.

you can do one thing that on click of button , you can write the code ..


It will delete the cookie immediately.
I agree. Here's the link:
subject: Logout user by deleting cookie
It's not a secret anymore!