diff options
author | knowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-05-16 20:00:55 +0000 |
---|---|---|
committer | knowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-05-16 20:00:55 +0000 |
commit | 171d4f61126744642c6e108cc158d4278d8fa0a1 (patch) | |
tree | 70e7768e41a4de905afcb53fd04736abe35f6709 /src/main | |
parent | a00b76722287305331aa2a22fb434d2cb165ccbb (diff) | |
download | pdf-as-3-171d4f61126744642c6e108cc158d4278d8fa0a1.tar.gz pdf-as-3-171d4f61126744642c6e108cc158d4278d8fa0a1.tar.bz2 pdf-as-3-171d4f61126744642c6e108cc158d4278d8fa0a1.zip |
minor changes
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@84 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/web/LocalRequestHelper.java | 1 | ||||
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/web/PdfASServletContextListener.java | 24 |
2 files changed, 19 insertions, 6 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/LocalRequestHelper.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/LocalRequestHelper.java index cac8eb3..2008fdc 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/LocalRequestHelper.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/LocalRequestHelper.java @@ -65,6 +65,7 @@ public abstract class LocalRequestHelper HttpServletRequest request, HttpServletResponse response) throws IOException, PresentableException
{
LocalConnector local_conn = (LocalConnector) ConnectorFactory.createConnector(si.connector);
+
// FIXME refactor WEB
String document_text = "fixme"; //si.iui.document_text;
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 fab3e04..4412c21 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 @@ -47,19 +47,31 @@ public class PdfASServletContextListener implements ServletContextListener /**
* @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
*/
- public void contextInitialized(ServletContextEvent arg0)
+ public void contextInitialized(ServletContextEvent sce)
{
- logger.info("PDF-AS Context init");
- String base_dir = arg0.getServletContext().getRealPath("/");
+ 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 base_dir = sce.getServletContext().getRealPath("/"); //$NON-NLS-1$
+ logger.info("PDF-AS real path = " + base_dir); //$NON-NLS-1$
+
try
{
- logger.info("PDF-AS base directory = " + new File(base_dir).getCanonicalPath());
+ logger.info("PDF-AS work directory = " + new File(work_dir).getCanonicalPath()); //$NON-NLS-1$
+ logger.info("PDF-AS base directory = " + new File(base_dir).getCanonicalPath()); //$NON-NLS-1$
}
catch (IOException e)
{
e.printStackTrace();
}
+ if (work_dir != null)
+ {
+ base_dir = work_dir;
+ }
+
SettingsReader.initializeForWeb(base_dir);
SettingsReader.clearTemporaryDirectory();
@@ -68,9 +80,9 @@ public class PdfASServletContextListener implements ServletContextListener /**
* @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent)
*/
- public void contextDestroyed(ServletContextEvent arg0)
+ public void contextDestroyed(ServletContextEvent sce)
{
SettingsReader.clearTemporaryDirectory();
- logger.info("PDF-AS Context exit");
+ logger.info("PDF-AS Context exit"); //$NON-NLS-1$
}
}
|