aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2008-03-20 11:41:03 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2008-03-20 11:41:03 +0000
commit440e74f9de28d2df476e1b98f952e98a80c6d7e4 (patch)
treefebb2b3dbccb2baf72efc73e20bfb6953fbaba39 /src
parent3230d71393a3e48d95f5a8e0b659d471abbaf66e (diff)
downloadpdf-as-3-440e74f9de28d2df476e1b98f952e98a80c6d7e4.tar.gz
pdf-as-3-440e74f9de28d2df476e1b98f952e98a80c6d7e4.tar.bz2
pdf-as-3-440e74f9de28d2df476e1b98f952e98a80c6d7e4.zip
System property "pdf-as.work-dir" for definition of the work directory introduced. Should be used instead of context/web.xml parameter. Additionally the profile configuration has been updated including the images.
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@254 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
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);