aboutsummaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/framework/config/SettingsHelper.java1
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java23
2 files changed, 16 insertions, 8 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/framework/config/SettingsHelper.java b/src/main/java/at/gv/egiz/pdfas/framework/config/SettingsHelper.java
index 6f67d1d..abe4378 100644
--- a/src/main/java/at/gv/egiz/pdfas/framework/config/SettingsHelper.java
+++ b/src/main/java/at/gv/egiz/pdfas/framework/config/SettingsHelper.java
@@ -17,6 +17,7 @@ public final class SettingsHelper
public static VerificationFilterParameters readVerificationFilterParametersFromSettings() throws SettingsException
{
boolean binaryOnly = getFlag("binary_only");
+ // TODO: tknall: typo should be fixed (including entry within config.properties)
boolean assumeOnlySB = getFlag("assume_only_signauture_blocks");
boolean checkOld = getFlag("check_old_textual_sigs");
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)];