diff options
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$
}
}
|