Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

This page applies to Wicket 1.3/2.0

Normally, you'd use one of the following to redirect to a Wicket page:

...

Code Block
public void onSubmit()
{
    // The HTTP RFC says redirects should always be absolute, so we
    // make an absolute path by prefixing with the context path.
    String contextPath = getApplication().getApplicationSettings().getContextPath();
    
    // Make sure no output for the current cycle is ever sent.
    getRequestCycle().setRequestTarget(new RedirectRequestTarget(contextPath + "/path/to/legacyJspFile.jsp"));

}

...