You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2011/04/21 21:47:06 UTC
[jira] [Resolved] (WICKET-3631) invoking setResponsePage after
setting cookie results in cookie not being created(no Set-Cookie header
being sent to the client).
[ https://issues.apache.org/jira/browse/WICKET-3631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-3631.
-------------------------------------
Resolution: Invalid
There is no problem here.
The cookie is set in the first response - the one that makes the redirect.
And it stays in the browser until expired or deleted.
Check it with real browser and see. The problem is in your code with httpclient.
> invoking setResponsePage after setting cookie results in cookie not being created(no Set-Cookie header being sent to the client).
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: WICKET-3631
> URL: https://issues.apache.org/jira/browse/WICKET-3631
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.5-RC3
> Reporter: Serban Balamaci
> Attachments: wicket-cookie.tar.gz
>
>
> invoking setResponsePage after setting cookie results in Set-Cookie header not being sent to the client.
> add(new Link("create-cookie") {
> @Override
> public void onClick() {
> CookieUtils cookieUtils = new CookieUtils();
> cookieUtils.getSettings().setMaxAge(60 * 60 * 24 * 7); //7 days expiration
> cookieUtils.save("rememberme", "john");
> //by adding the call to setResponsePage(TestPage2.class);
> //cookie will not be created
> //comment the line below and cookie is being created
> setResponsePage(TestPage2.class);
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira