aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/PdfASServletContextListener.java13
1 files changed, 10 insertions, 3 deletions
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 0e0c625..adb31be 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
@@ -52,8 +52,16 @@ public class PdfASServletContextListener implements ServletContextListener
{
logger.info("PDF-AS Context init"); //$NON-NLS-1$
- String work_dir = sce.getServletContext().getInitParameter("work-dir"); //$NON-NLS-1$
- logger.info("PDF-AS work-dir context parameter = " + work_dir); //$NON-NLS-1$
+ String sysPropWorkdir = System.getProperty("pdf-as.work-dir");
+ String work_dir;
+ if (sysPropWorkdir != null && sysPropWorkdir.length() > 0) {
+ work_dir = sysPropWorkdir;
+ logger.info("Work-dir configuration via system property.");
+ logger.info("PDF-AS work-dir via system property = " + work_dir); //$NON-NLS-1$
+ } else {
+ work_dir = sce.getServletContext().getInitParameter("work-dir"); //$NON-NLS-1$
+ logger.info("PDF-AS work-dir context parameter = " + work_dir); //$NON-NLS-1$
+ }
String base_dir = sce.getServletContext().getRealPath("/"); //$NON-NLS-1$
logger.info("PDF-AS real path = " + base_dir); //$NON-NLS-1$
@@ -70,7 +78,6 @@ public class PdfASServletContextListener implements ServletContextListener
if (work_dir != null && work_dir.length() > 0)
{
- logger.info("The PDF-AS work-dir context parameter is present (and not empty).");
base_dir = work_dir;
}
logger.info("The PDF-AS application will be initialized for the directory: " + base_dir);