From c71563c8a6e9993cbbdff3ddfdfccfee4aa34f7b Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Tue, 4 Sep 2012 16:48:13 +0300 Subject: Extract ApplicationConfiguration from DeploymentConfiguration (#9382) --- uitest/src/com/vaadin/tests/util/SampleDirectory.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'uitest/src/com/vaadin/tests') diff --git a/uitest/src/com/vaadin/tests/util/SampleDirectory.java b/uitest/src/com/vaadin/tests/util/SampleDirectory.java index ef20da788d..e15f0ccfe3 100644 --- a/uitest/src/com/vaadin/tests/util/SampleDirectory.java +++ b/uitest/src/com/vaadin/tests/util/SampleDirectory.java @@ -52,8 +52,10 @@ public class SampleDirectory { // cannot access example directory, possible security issue with // Application Server or Servlet Container // Try to read sample directory from web.xml parameter - if (application.getProperty("sampleDirectory") != null) { - file = new File(application.getProperty("sampleDirectory")); + String sampleDirProperty = application.getConfiguration() + .getInitParameters().getProperty("sampleDirectory"); + if (sampleDirProperty != null) { + file = new File(sampleDirProperty); if ((file != null) && (file.canRead()) && (file.getAbsolutePath() != null)) { // Success using property @@ -61,7 +63,7 @@ public class SampleDirectory { } // Failure using property errorMessage += "Failed also to access sample directory [" - + application.getProperty("sampleDirectory") + + sampleDirProperty + "] defined in sampleDirectory property."; } else { // Failure using application context base dir, no property set -- cgit v1.2.3