aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/knowcenter')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java2
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java25
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/PdfASServletContextListener.java4
3 files changed, 18 insertions, 13 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
index 5dbc7fb..7def267 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
@@ -96,7 +96,7 @@ public abstract class PdfAS
* The current version of the pdf-as library. This version string is logged on every invocation
* of the api or the web application.
*/
- public static final String PDFAS_VERSION = "3.0.5-20080603";
+ public static final String PDFAS_VERSION = "3.0.5-20080610";
/**
* The key of the strict mode setting.
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java b/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java
index 231da06..31ca5e1 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/cfg/SettingsReader.java
@@ -694,14 +694,14 @@ public class SettingsReader implements Serializable
public static synchronized void initialize(String configdir, String tmpdir) {
- boolean defaultConfigDeployed = false;
+ String defaultConfigDeployedTo = null;
// resolve work directory
// configuration explicitely given ?
if (configdir == null) {
// configuration via system property ?
- logger_.debug("No configuration directory given. Looking for system property \"" + Constants.CONFIG_SYSTEM_PROPERTY + "\".");
- configdir = System.getProperty(Constants.CONFIG_SYSTEM_PROPERTY);
+ logger_.debug("No configuration directory given. Looking for system property \"" + Constants.CONFIG_DIR_SYSTEM_PROPERTY + "\".");
+ configdir = System.getProperty(Constants.CONFIG_DIR_SYSTEM_PROPERTY);
if (configdir == null) {
// configuration via user's home directory ?
@@ -712,17 +712,20 @@ public class SettingsReader implements Serializable
}
configdir = assertFileSeparator(userHome) + Constants.USERHOME_CONFIG_FOLDER;
try {
- defaultConfigDeployed = ConfigUtils.deployDefaultConfiguration(configdir, false);
+ defaultConfigDeployedTo = ConfigUtils.deployDefaultConfiguration(configdir, false);
} catch (ConfigUtilsException e) {
throw new RuntimeException(e);
}
- if (defaultConfigDeployed) {
- logger_.info("** Default configuration successfully deployed to the current user's home. **");
+ if (defaultConfigDeployedTo != null) {
+ logger_.info("** Default configuration successfully deployed to \"" + defaultConfigDeployedTo + "\" **");
} else {
- logger_.debug("Default configuration NOT deployed because to the current user's home because it already exists.");
+ logger_.debug("Default configuration has NOT been deployed. Maybe the configuration already exists.");
}
} else {
logger_.debug("Configuration set by system property.");
+ if (tmpdir == null) {
+ tmpdir = configdir;
+ }
}
} else {
logger_.debug("Configuration path explicitely set.");
@@ -768,10 +771,12 @@ public class SettingsReader implements Serializable
logger_.debug(" configuration path = \"" + CONFIG_PATH + "\"");
logger_.debug(" certstore path = \"" + CERT_PATH + "\"");
logger_.debug(" temporary path = \"" + TMP_PATH + "\"");
- if (defaultConfigDeployed) {
- logger_.debug(" default configuration was deployed to the current user's home directory ");
- }
logger_.debug(StringUtils.repeat("*", length + 25));
+ if (defaultConfigDeployedTo != null) {
+ logger_.debug("** Default configuration successfully deployed to \"" + defaultConfigDeployedTo + "\" **");
+ }
+ logger_.debug("Setting system property \"" + Constants.CONFIG_DIR_SYSTEM_PROPERTY + "\" to \"" + configdirFile.getPath() + "\".");
+ System.setProperty(Constants.CONFIG_DIR_SYSTEM_PROPERTY, configdirFile.getPath());
}
public static void initialize(String base_dir)
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/PdfASServletContextListener.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/PdfASServletContextListener.java
index e33a5ec..219fec2 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/web/PdfASServletContextListener.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/PdfASServletContextListener.java
@@ -58,7 +58,7 @@ public class PdfASServletContextListener implements ServletContextListener
{
logger.info("PDF-AS Context init"); //$NON-NLS-1$
- String sysPropWorkdir = System.getProperty(Constants.CONFIG_SYSTEM_PROPERTY);
+ String sysPropWorkdir = System.getProperty(Constants.CONFIG_DIR_SYSTEM_PROPERTY);
String scWorkdir = sce.getServletContext().getInitParameter(CONFIG_SERVLET_INIT_PARAMETER);
String work_dir;
@@ -66,7 +66,7 @@ public class PdfASServletContextListener implements ServletContextListener
// search for system property
if (sysPropWorkdir != null && sysPropWorkdir.length() > 0) {
work_dir = sysPropWorkdir;
- logger.debug("Work-dir configuration via system property \"" + Constants.CONFIG_SYSTEM_PROPERTY + "\" = \"" + sysPropWorkdir + "\".");
+ logger.debug("Work-dir configuration via system property \"" + Constants.CONFIG_DIR_SYSTEM_PROPERTY + "\" = \"" + sysPropWorkdir + "\".");
// search for servlet parameter
} else if (scWorkdir != null && scWorkdir.length() > 0){