Tried that, and it didn't make any difference (getRequestCycle().setRedirect(false)).
The page is called via a BookmarkablePageLink. Debugging reveals that the constructor, below, is called every time the link is clicked, so it isn't an issue of the code not being called. I also tried calling it via a <wicket:link> as well - no dice. Earlier, someone mentioned something about "pushing" to the HttpServletResponse object. What does this mean, exactly? Thanks -----Original Message----- From: Johan Compagner [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 07, 2008 2:24 AM To: users@wicket.apache.org Subject: Re: forcing cookies to expire how is that page called/created? if you do this: public SignOut() { clearCookie(Register.REMEMBER_ME_COOKIE); getSession().invalidate(); getRequestCycle().setRedirct(false) } what then On Tue, May 6, 2008 at 4:16 PM, Andrew Broderick < [EMAIL PROTECTED]> wrote: > Hi, > > clearCookie() is called in the constructor of a page called SignOut. The > entire constructor is: > > public SignOut() > { > clearCookie(Register.REMEMBER_ME_COOKIE); > getSession().invalidate(); > } > > As I mentioned the cookie is never cleared. Is there something else I need > to do? > > Thanks > > -----Original Message----- > From: Johan Compagner [mailto:[EMAIL PROTECTED] > Sent: Monday, May 05, 2008 5:58 PM > To: users@wicket.apache.org > Subject: Re: forcing cookies to expire > > When is that clear cookie called? > Can you follow that call a bit more, is it pushed to the > httpservletresponse object? > > On 5/5/08, Andrew Broderick <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I am trying to manage cookies in Wicket. I can create them and read them > no > > problem, but forcing expiry by setting maxAge=0 does not seem to be > working. > > Here is the code: > > > > Set cookie: > > > > public void setRememberMeCookie(String username) > > { > > Cookie cookie = new Cookie(REMEMBER_ME_COOKIE, username); > > cookie.setMaxAge(-1); > > cookie.setPath("/"); > > getWebRequestCycle().getWebResponse().addCookie(cookie); > > } > > > > Clear cookie: > > > > private void clearCookie(String name) > > { > > Cookie cookie = > > getWebRequestCycle().getWebRequest().getCookie(name); > > cookie.setMaxAge(0); > > getWebRequestCycle().getWebResponse().addCookie(cookie); > > } > > > > The code is definitely called. However, the cookie remains. What am I > doing > > wrong? > > > > Thanks > > > > _______________________________________________________ > > > > The information in this email or in any file attached > > hereto is intended only for the personal and confiden- > > tial use of the individual or entity to which it is > > addressed and may contain information that is propri- > > etary and confidential. If you are not the intended > > recipient of this message you are hereby notified that > > any review, dissemination, distribution or copying of > > this message is strictly prohibited. This communica- > > tion is for information purposes only and should not > > be regarded as an offer to sell or as a solicitation > > of an offer to buy any financial product. Email trans- > > mission cannot be guaranteed to be secure or error- > > free. P6070214 > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]