aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2015-09-17 12:47:04 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2015-09-17 12:47:04 +0200
commit92ce50f3dc07af0b34e9b3830eadf44b46187ca6 (patch)
tree88d00391b52d1316a8c1f2a8a0fa303ba3d68fbe /pdf-as-web/src/main
parentf6ed6ae57161cd01e6de13c0fe6c1132e5b06c99 (diff)
downloadpdf-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')
-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
-rw-r--r--pdf-as-web/src/main/webapp/assets/js/dragNdrop.js2
-rw-r--r--pdf-as-web/src/main/webapp/index.jsp2
4 files changed, 12 insertions, 4 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);
diff --git a/pdf-as-web/src/main/webapp/assets/js/dragNdrop.js b/pdf-as-web/src/main/webapp/assets/js/dragNdrop.js
index 46cf6bac..547951d7 100644
--- a/pdf-as-web/src/main/webapp/assets/js/dragNdrop.js
+++ b/pdf-as-web/src/main/webapp/assets/js/dragNdrop.js
@@ -403,7 +403,7 @@ function sign(file, connector, locale) {
form.method = "POST";
form.action = "Sign";
form.target = "mobileSignOnFrame";
- form.enctype = "multipart/form-data";
+ form.enctype = "application/x-www-form-urlencoded";
var input = document.createElement('input');
input.type = 'hidden';
diff --git a/pdf-as-web/src/main/webapp/index.jsp b/pdf-as-web/src/main/webapp/index.jsp
index 45ea4fed..283d1294 100644
--- a/pdf-as-web/src/main/webapp/index.jsp
+++ b/pdf-as-web/src/main/webapp/index.jsp
@@ -139,7 +139,7 @@
}
%>
</div>
- <iframe id='mobileSignOnFrame' style="display:none;" src="http://129.27.142.196:8080/"></iframe>
+ <iframe id='mobileSignOnFrame' name='mobileSignOnFrame' style="display:none;"></iframe>
</div>
</div>
<div id="DownloadContainer" style="display: none;">