diff --git a/webapp/test/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/ObjectPropertyTemplateModel_PropertyListConfigTest.java b/webapp/test/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/ObjectPropertyTemplateModel_PropertyListConfigTest.java index ec406d561..cf405b7b0 100644 --- a/webapp/test/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/ObjectPropertyTemplateModel_PropertyListConfigTest.java +++ b/webapp/test/edu/cornell/mannlib/vitro/webapp/web/templatemodels/individual/ObjectPropertyTemplateModel_PropertyListConfigTest.java @@ -120,7 +120,7 @@ public class ObjectPropertyTemplateModel_PropertyListConfigTest extends ctx = new ServletContextStub(); // create paths for all of the files in the temporary config directory. - ctx.setRealPaths("/config", configDir); + ctx.setRealPaths("/config/", configDir); // add a path to match the hard-coded default path. ctx.setRealPath("/config/listViewConfig-default.xml", ctx.getRealPath("/config/testConfig-default.xml")); diff --git a/webapp/test/stubs/javax/servlet/ServletContextStub.java b/webapp/test/stubs/javax/servlet/ServletContextStub.java index b8269ec60..608289997 100644 --- a/webapp/test/stubs/javax/servlet/ServletContextStub.java +++ b/webapp/test/stubs/javax/servlet/ServletContextStub.java @@ -69,12 +69,12 @@ public class ServletContextStub implements ServletContext { /** * Call setRealPath for each of the files in this directory (non-recursive). - * Use the prefix, a separator, and the filename as the path. + * The prefix is the "pretend" location that we're mapping these files to, + * e.g. "/config/". Use the prefix and the filename as the path. */ public void setRealPaths(String pathPrefix, File dir) { for (File file : dir.listFiles()) { - setRealPath(pathPrefix + "/" + file.getName(), - file.getPath()); + setRealPath(pathPrefix + file.getName(), file.getPath()); } }