diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2015-09-01 13:19:20 +0200 |
---|---|---|
committer | fschneider <florian.schneider@student.tugraz.at> | 2015-09-01 13:28:49 +0200 |
commit | 49e49e58f97d16f3cd185f46f5ba1817c44b98b2 (patch) | |
tree | 9f0b2d0571bbee9cd25032f80e3f0ec3b9be4f95 /pdf-as-web/src/main/java/at | |
parent | ae7594d7ade2ebcf56a5ea4d6fe3800d88563288 (diff) | |
download | pdf-as-4-49e49e58f97d16f3cd185f46f5ba1817c44b98b2.tar.gz pdf-as-4-49e49e58f97d16f3cd185f46f5ba1817c44b98b2.tar.bz2 pdf-as-4-49e49e58f97d16f3cd185f46f5ba1817c44b98b2.zip |
send post message to parent in result page
Conflicts:
pdf-as-web/src/main/resources/template_provide.html
Diffstat (limited to 'pdf-as-web/src/main/java/at')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ErrorPage.java | 3 | ||||
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ErrorPage.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ErrorPage.java index 670756de..2afc811c 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ErrorPage.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ErrorPage.java @@ -55,6 +55,7 @@ public class ErrorPage extends HttpServlet { private static final String ERROR_STACK = "##ERROR_STACK##"; private static final String ERROR_MESSAGE = "##ERROR_MESSAGE##"; + private static final String PUBLIC_URL = "##PUBLICURL##"; /** * @see HttpServlet#HttpServlet() @@ -164,6 +165,8 @@ public class ErrorPage extends HttpServlet { template = template.replace(ERROR_STACK, ""); } + template = template.replace(PUBLIC_URL, WebConfiguration.getPublicURL()); + response.setContentType("text/html"); response.getWriter().write(template); response.getWriter().close(); diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java index 7909e926..8a23b132 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java @@ -50,6 +50,7 @@ public class ProvidePDFServlet extends HttpServlet { .getLogger(ProvidePDFServlet.class); private static final String PDF_DATA_URL = "##PDFDATAURL##"; + private static final String PUBLIC_URL = "##PUBLICURL##"; /** * @see HttpServlet#HttpServlet() @@ -89,6 +90,7 @@ public class ProvidePDFServlet extends HttpServlet { String template = PdfAsHelper.getProvideTemplate(); template = template.replace(PDF_DATA_URL, PdfAsHelper.generatePdfURL(request, response)); + template = template.replace(PUBLIC_URL, WebConfiguration.getPublicURL()); // Deliver to Browser directly! response.setContentType("text/html"); response.getWriter().write(template); |