aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at/gv/egiz
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ErrorPage.java6
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java6
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);