Hi,

You can use something like:
String url = urlFor(page, page.getPageParameters());
throw new RedirectToUrlException(url, 302);



On Mon, Apr 8, 2013 at 4:33 PM, divad91 <diva...@hotmail.com> wrote:

> In wicket 1.4.21, I was using the RedirectException class. Cookies were
> transfered.
>
>         public HomePage(final PageParameters parameters) {
>                 super(parameters);
>
>                 if (MySession.session().isSessionSetup()) {
>                         Cookie requestCookie = ((WebRequest)
> getRequest()).getCookie("appCoookie");
>                         if (requestCookie == null) {
>                                 // Cookies are not enabled.
>                         }
>                         // Working with wicket 1.4.21
>                 }
>
>                 Cookie appCookie = new Cookie("appCoookie", "1");
>                 appCookie.setMaxAge(3600 * 5);
>                 appCookie.setPath("/");
>                 appCookie.setSecure(false);
>                 ((WebResponse) getResponse()).addCookie(appCookie);
>
>                 if (!MySession.session().isSessionSetup()) {
>                         MySession.session().setIsSessionSetup(true);
>                         throw new RedirectException(HomePage.class);
>                 }
>     }
>
> Is there a similar exception that I could use in wicket 6.6.0 to do the
> same
> work  (add the cookie to the response and then check it in the request) ?
>
> Thanks
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Browser-Cookie-detection-tp4657744p4657822.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to