hej,

I ve found this
http://apache-wicket.1842946.n4.nabble.com/Wickettester-cookies-and-redirects-in-Wicket-1-4-15-td3250792.html

but im developing on 1.5.2 and ticket is closed. I believe it is the same case.

this is description:
I have a page ValidationPage that accepts request, checks parameters
and sets cookie on response object

((WebResponse)getRequestCycle().getResponse()).addCookie(new
Cookie("mycookie", VAL));

then on certain condition I want to redirect to original destination
or to some set page

if (!continueToOriginalDestination())
{
    log.warning("redirect failed redirecting to original destination");
    throw new RestartResponseException(new MyOtherPage());
}

so in test

tester.startPage(ValidationPage.class, pageParameters);
tester.assertRenderedPage(MyOtherPage.class);
final Cookie[] cookies = tester.getRequest().getCookies();
assertNotNull(cookies); - > fail

and I get null, I tried Reponse object but no luck. I thought cookies
should be resend in next request back to server right?

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski....@gmail.com
______________________

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to