Versions Compared

Key

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

...

Code Block
...

Link logoutLink = new Link("my-link-wicket-id") {

	public void onClick() {
		getSession().invalidate();
		getRequestCycle().setRequestTarget(new RedirectRequestTarget("http://www.another-web-site.com") );
	}
};

...

Wiki Markup\[1\] it is important to use setResponsePage() variant that takes a page class and not a page instance because a page instance would be stored in session that is now marked for invalidation - thus resulting in a page expired error