aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-09-16 02:33:14 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-09-16 02:33:14 +0000
commit9ffb457a5745de09be04aad98761b2d179892f11 (patch)
tree5a09dd1a0afa6af895d028a67ecf73c413c0a016 /src/main/java/at/knowcenter
parente02e02f86e275544c5919e1c867d1843e06181cf (diff)
downloadpdf-as-3-9ffb457a5745de09be04aad98761b2d179892f11.tar.gz
pdf-as-3-9ffb457a5745de09be04aad98761b2d179892f11.tar.bz2
pdf-as-3-9ffb457a5745de09be04aad98761b2d179892f11.zip
minor bug fixed (query url for external webapp was not correctly built)
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@212 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java
index 04971c6..13e6703 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java
@@ -189,16 +189,23 @@ public class SignServlet extends HttpServlet
String sig_pos_y = (String) request.getParameter(FormFields.FIELD_SIGPOS_Y);
String sig_pos_p = (String) request.getParameter(FormFields.FIELD_SIGPOS_P);
- try
- {
- pos = new TablePos("y:" + sig_pos_y + ";p:" + sig_pos_p);
- }
- catch (PDFDocumentException e)
- {
- log.warn("Uanable to create signature position object: " + e.getMessage());
+ // added by tknall
+ if (sig_pos_y != null && sig_pos_p != null) {
+ try
+ {
+ pos = new TablePos("y:" + sig_pos_y + ";p:" + sig_pos_p);
+ }
+ catch (PDFDocumentException e)
+ {
+ log.warn("Unable to create signature position object: " + e.getMessage());
+ }
+ } else {
+ log.debug("No signature position provided.");
}
- String query = pdf_url + "&" + FormFields.FIELD_PDF_ID + "=" + pdf_id;
+ // fixed by tknall: if we already have parameters "&" must be used instead of "?"
+ String paramSeparator = (pdf_url.indexOf("?") != -1) ? "&" : "?";
+ String query = pdf_url + paramSeparator + FormFields.FIELD_PDF_ID + "=" + pdf_id;
// wprinz: rem: this allocation is useless
// byte[] extern_pdf = new byte[Integer.parseInt(pdf_length)];