Wicket: how to redirect to another page?

后端 未结 5 1870
花落未央
花落未央 2020-12-24 02:36

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条回答
  •  心在旅途
    2020-12-24 03:36

    you can use

    setResponsePage(new RedirectPage("/"));

    or

    setResponsePage(HomePage.class);

    or

    throw new RestartResponseException(HomePage.class);

提交回复
热议问题