From 92ce50f3dc07af0b34e9b3830eadf44b46187ca6 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Thu, 17 Sep 2015 12:47:04 +0200 Subject: fixed submit problem at least for desktop (check mobile app) --- .../src/main/java/at/gv/egiz/pdfas/web/servlets/ErrorPage.java | 6 +++++- .../main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'pdf-as-web/src/main/java') 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); -- cgit v1.2.3