summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/gitblit/wicket/GitblitRedirectException.java22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/main/java/com/gitblit/wicket/GitblitRedirectException.java b/src/main/java/com/gitblit/wicket/GitblitRedirectException.java
index 23ac7efa..9eb76bfd 100644
--- a/src/main/java/com/gitblit/wicket/GitblitRedirectException.java
+++ b/src/main/java/com/gitblit/wicket/GitblitRedirectException.java
@@ -15,12 +15,13 @@
*/
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
@@ -31,7 +32,7 @@ import org.apache.wicket.request.target.basic.RedirectRequestTarget;
*
* @author James Moger
*/
-public class GitblitRedirectException extends AbstractRestartResponseException {
+public class GitblitRedirectException extends RestartResponseException {
private static final long serialVersionUID = 1L;
@@ -40,10 +41,11 @@ public class GitblitRedirectException extends AbstractRestartResponseException {
}
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);
}
}