Hi,

I set a cookie from JavaScript in the chrome browser like

> var d = new Date();
> d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
> var expires = "expires=" + d.toUTCString();
> document.cookie = "test=true;1;path=/";


So the cookie value in the chrome is "true" (cookie "test"="true")

then I am trying to clear the cookie in the wicket like

  WebRequest webRequest = (WebRequest) RequestCycle.get().getRequest();

WebResponse webResponse = (WebResponse) RequestCycle.get().getResponse();

Cookie cookietest = webRequest.getCookie("test");
> webResponse.clearCookie(cookietest);


The cookie is not deleted. I run the wicket web app on tomcat server. Does
anyone know what could be wrong?


Just to be clear the cookie we set with JavaScript and the cookie we
retrieve in wicket is pointing to the same space? I am confused why it
wouldn't work. Does it have to anything with the Tomcat server?

Best Regards,
Sibgha Nazir

Reply via email to