Author: almaw Date: Thu Jan 18 06:27:23 2007 New Revision: 497444 URL: http://svn.apache.org/viewvc?view=rev&rev=497444 Log: WICKET-149 fix for mounted URLs fail if filterPath is blank
Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java?view=diff&rev=497444&r1=497443&r2=497444 ============================================================================== --- incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java (original) +++ incubator/wicket/trunk/wicket/src/main/java/wicket/protocol/http/servlet/ServletWebRequest.java Thu Jan 18 06:27:23 2007 @@ -150,7 +150,8 @@ String rootPath = ((WebApplication)Application.get()).getRootPath(); if (url.startsWith(rootPath)) { - return url.substring(rootPath.length()); + // We return everything after rootPath, making sure we start with a slash. + return url.substring(rootPath.endsWith("/") ? rootPath.length() - 1 : rootPath.length()); } return null; }