diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2015-09-17 12:47:04 +0200 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2015-09-17 12:47:04 +0200 |
commit | 92ce50f3dc07af0b34e9b3830eadf44b46187ca6 (patch) | |
tree | 88d00391b52d1316a8c1f2a8a0fa303ba3d68fbe /pdf-as-web/src/main/java/at/gv/egiz/pdfas | |
parent | f6ed6ae57161cd01e6de13c0fe6c1132e5b06c99 (diff) | |
download | pdf-as-4-92ce50f3dc07af0b34e9b3830eadf44b46187ca6.tar.gz pdf-as-4-92ce50f3dc07af0b34e9b3830eadf44b46187ca6.tar.bz2 pdf-as-4-92ce50f3dc07af0b34e9b3830eadf44b46187ca6.zip |
fixed submit problem at least for desktop (check mobile app)
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ErrorPage.java | 6 | ||||
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java | 6 |
2 files changed, 10 insertions, 2 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 2afc811c..1b16b6eb 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 @@ -165,7 +165,11 @@ public class ErrorPage extends HttpServlet { template = template.replace(ERROR_STACK, ""); } - template = template.replace(PUBLIC_URL, WebConfiguration.getPublicURL()); + if(WebConfiguration.getPublicURL() != null) { + template = template.replace(PUBLIC_URL, WebConfiguration.getPublicURL()); + } else { + template = template.replace(PUBLIC_URL, ""); + } response.setContentType("text/html"); response.getWriter().write(template); 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 8a23b132..369e488d 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 @@ -90,7 +90,11 @@ 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()); + if(WebConfiguration.getPublicURL() != null) { + template = template.replace(PUBLIC_URL, WebConfiguration.getPublicURL()); + } else { + template = template.replace(PUBLIC_URL, ""); + } // Deliver to Browser directly! response.setContentType("text/html"); response.getWriter().write(template); |