/** * Saves url to redirect to when buffered response is flushed. Implementations should encode the * URL to make sure cookie-less operation is supported in case clients forgot. * * @param url * The URL to redirect to */ public final void redirect(final String url) { if (redirectURL != null) { throw new WicketRuntimeException("Already redirecting to '" + redirectURL + "'. Cannot redirect more than once"); } // encode to make sure no caller forgot this this.redirectURL = encodeURL(url).toString(); }
/** * Saves url to redirect to when buffered response is flushed. Implementations should encode the * URL to make sure cookie-less operation is supported in case clients forgot. * * @param url * The URL to redirect to */ @Override public final void redirect(final String url) { if (redirectURL != null) { throw new WicketRuntimeException("Already redirecting to '" + redirectURL + "'. Cannot redirect more than once"); } // encode to make sure no caller forgot this redirectURL = encodeURL(url).toString(); }