Wicket: how to redirect to another page?

Viewed 38386

How do I redirect to another page using Wicket? IIRC, some exception has to be thrown in the constructor, but I don't remember which one. Thanks in advance.

5 Answers

you can use

setResponsePage(new RedirectPage("/"));

or

setResponsePage(HomePage.class);

or

throw new RestartResponseException(HomePage.class);

Related