Hi,
I am using CookieUtils to store a cookie. Here's the catch though: after
setting the cookie, I want to redirect the user to a new page, so that
is followed immediately by a RestartResponseException:
new CookieUtils().save("some-key", "some-value")
throw new RestartResponseException(AnotherPage.class);
The net result seems to be that Wicket uses an HTTP 3xx to get the user
agent to go to the new page (which is what I want, since the URL
changes), but the cookie does NOT get set.
If instead of RestartResponseException the I use:
RequestCycle.get().setResponsePage(AnotherPage.class);
...the cookie gets set properly and the redirect occurs as desired, but
I need to perform the redirect in "library code", which should prevent
the calling thread from proceeding beyond the redirect point (which
RestartResponseException nicely addresses).
Is there some way to use RestartResponseException without discarding
cookies?
Cheers,
Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]