[
https://issues.apache.org/jira/browse/WICKET-4101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Grigorov resolved WICKET-4101.
-------------------------------------
Resolution: Invalid
CookieUtils#remove() looks up the cookie from the current request and schedules
it for deletion by setting its max age to 0 and putting it in the current
response.
Since you didn't put it in the current request there is nothing to delete.
Just add
wicketTester.getRequest().addCookie(cookie);
before
System.out.println("value = " + cookie.getValue());//
and it will work.
> Cannot read Cookie with WicketTester more than once
> ---------------------------------------------------
>
> Key: WICKET-4101
> URL: https://issues.apache.org/jira/browse/WICKET-4101
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.1
> Environment: Wicket version: 1.5.1
> java version "1.6.0_25"
> Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
> Java HotSpot(TM) Client VM (build 20.0-b11, mixed mode, sharing)
> Reporter: bernard
> Priority: Minor
> Attachments: CookieQuickStart.zip
>
>
> WicketTester has been working so well for me that I am not really sure
> whether this is a bug.
> The attached quickstart is only for testing of the single class, not page
> display.
> It can add a cookie then test it but it cannot add one, remove one and then
> test that is is actually removed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira