diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-09-04 16:48:13 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-09-05 11:39:35 +0300 |
commit | c71563c8a6e9993cbbdff3ddfdfccfee4aa34f7b (patch) | |
tree | 8f35fb183d97efa07dfca8dcbc6f4b126e973d43 /uitest/src/com/vaadin/tests | |
parent | 437e700dfc4173da66d45abd95b6f661d7216218 (diff) | |
download | vaadin-framework-c71563c8a6e9993cbbdff3ddfdfccfee4aa34f7b.tar.gz vaadin-framework-c71563c8a6e9993cbbdff3ddfdfccfee4aa34f7b.zip |
Extract ApplicationConfiguration from DeploymentConfiguration (#9382)
Diffstat (limited to 'uitest/src/com/vaadin/tests')
-rw-r--r-- | uitest/src/com/vaadin/tests/util/SampleDirectory.java | 8 |
1 files changed, 5 insertions, 3 deletions
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 <b>[" - + application.getProperty("sampleDirectory") + + sampleDirProperty + "]</b> defined in <b>sampleDirectory property</b>."; } else { // Failure using application context base dir, no property set |