aboutsummaryrefslogtreecommitdiff
path: root/spss.slinterface/WEB-INF/src/at
diff options
context:
space:
mode:
Diffstat (limited to 'spss.slinterface/WEB-INF/src/at')
-rw-r--r--spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/listeners/ContextListener.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/listeners/ContextListener.java b/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/listeners/ContextListener.java
index 52de9c625..b865b2ee4 100644
--- a/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/listeners/ContextListener.java
+++ b/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/listeners/ContextListener.java
@@ -5,6 +5,7 @@
*/
package at.gv.egovernment.moa.spss.slinterface.listeners;
+import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
@@ -72,7 +73,17 @@ public class ContextListener implements ServletContextListener
// Load init properties
try
{
+ logger_.debug("Init properties location \"" + initPropsLoc + "\" will be used.");
+
+ // Try to interpret init properties location as relative to the web application root
InputStream initPropsIS = context.getResourceAsStream(initPropsLoc);
+
+ if (initPropsIS == null)
+ {
+ // If this does not work, try to interpret init properties location as an absolute file system path
+ initPropsIS = new FileInputStream(initPropsLoc);
+ }
+
Properties initProps = new Properties();
initProps.load(initPropsIS);
context.setAttribute(Constants.WSCP_INIT_PROPS_, initProps);