*/
package com.gitblit.wicket;
-import org.apache.wicket.AbstractRestartResponseException;
+//import org.apache.wicket.AbstractRestartResponseException;
import org.apache.wicket.Page;
-import org.apache.wicket.request.cycle.RequestCycle;
+import org.apache.wicket.RestartResponseException;
+//import org.apache.wicket.request.cycle.RequestCycle;
import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.wicket.protocol.http.RequestUtils;
-import org.apache.wicket.request.target.basic.RedirectRequestTarget;
+//import org.apache.wicket.protocol.http.RequestUtils;
+//import org.apache.wicket.request.target.basic.RedirectRequestTarget;
/**
* This exception bypasses the servlet container rewriting relative redirect
*
* @author James Moger
*/
-public class GitblitRedirectException extends AbstractRestartResponseException {
+public class GitblitRedirectException extends RestartResponseException {
private static final long serialVersionUID = 1L;
}
public <C extends Page> GitblitRedirectException(Class<C> pageClass, PageParameters params) {
- RequestCycle cycle = RequestCycle.get();
- String relativeUrl = cycle.urlFor(pageClass, params).toString();
- String absoluteUrl = RequestUtils.toAbsolutePath(relativeUrl);
- cycle.setRequestTarget(new RedirectRequestTarget(absoluteUrl));
- cycle.setRedirect(true);
+ super(pageClass, params);
+// RequestCycle cycle = RequestCycle.get();
+// String relativeUrl = cycle.urlFor(pageClass, params).toString();
+// String absoluteUrl = RequestUtils.toAbsolutePath(relativeUrl);
+// cycle.setRequestTarget(new RedirectRequestTarget(absoluteUrl));
+// cycle.setRedirect(true);
}
}