You can also use the setResponsePage method using a page class and PageParameters, resuling in a URL that is absolute, and can be used even when the user's session was ended.

System.out.println("Foo");

Bar