Author: almaw Date: Tue Jun 12 17:31:01 2007 New Revision: 546685 URL: http://svn.apache.org/viewvc?view=rev&rev=546685 Log: WICKET-610 - header contributions fail on <error-pages>
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java?view=diff&rev=546685&r1=546684&r2=546685 ============================================================================== --- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java (original) +++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java Tue Jun 12 17:31:01 2007 @@ -256,7 +256,12 @@ // stuff, with a leading slash. String forwardUrl = (String)httpRequest.getAttribute("javax.servlet.forward.servlet_path"); - if (errorUrl != null) + if (forwardUrl != null) + { + // If this is an error page, this will be /mount or /?wicket:foo + relativeUrl = forwardUrl.substring(1); + } + else if (errorUrl != null) { // Strip off context path from front of URI. errorUrl = errorUrl.substring(httpRequest.getContextPath().length()); @@ -278,12 +283,6 @@ } } return relativePathPrefixToWicketHandler = prepender.toString(); - } - - if (forwardUrl != null) - { - // Strip off leading slash, if forwardUrl has any length. - relativeUrl = forwardUrl.substring(relativeUrl.length() > 0 ? 1 : 0); } else if (wicketRedirectUrl != null) {