aboutsummaryrefslogtreecommitdiff
path: root/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss
diff options
context:
space:
mode:
authorgregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2005-04-15 11:05:08 +0000
committergregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2005-04-15 11:05:08 +0000
commitf84f05273964bfbd85854088f3d860f650903f55 (patch)
tree1a214c5ce212682fb50596e3e552904754526586 /spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss
parent70ec208330696e4ed4c34f6d402452f1535aebdb (diff)
downloadmoa-id-spss-f84f05273964bfbd85854088f3d860f650903f55.tar.gz
moa-id-spss-f84f05273964bfbd85854088f3d860f650903f55.tar.bz2
moa-id-spss-f84f05273964bfbd85854088f3d860f650903f55.zip
Initialisierungs-Property-Datei kann nun entweder aus dem Servlet-Kontext oder vom Dateisystem geladen werden.
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@289 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss')
-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);