aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-web/src/main/java/at')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SignServlet.java41
1 files changed, 20 insertions, 21 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SignServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SignServlet.java
index 2856a7d..a051396 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SignServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/SignServlet.java
@@ -222,9 +222,6 @@ public class SignServlet extends HttpServlet
log.debug("No signature position provided.");
}
- if (note.equals("true")) {
- sig_type = sig_type + "_NOTE";
- }
// fixed by tknall: if we already have parameters "&" must be used instead of "?"
String paramSeparator = (pdf_url.indexOf("?") != -1) ? "&" : "?";
@@ -251,13 +248,21 @@ public class SignServlet extends HttpServlet
ud_extern.sig_mode = sig_mode;
ud_extern.sig_type = sig_type;
- if (note.equals("true")) {
- ud_extern.note=true;
+ if (note!=null) {
+ if (note.equals("true")) {
+ ud_extern.note=true;
+ ud_extern.sig_type = ud_extern.sig_type + "_NOTE";
+ }
+ else {
+ ud_extern.note=false;
+ }
}
else {
- ud_extern.note=false;
+ ud_extern.note=true;
+ ud_extern.sig_type = ud_extern.sig_type + "_NOTE";
}
- ud_extern.note = true;
+
+
ud_extern.pdfa = false;
ud = ud_extern;
@@ -332,7 +337,7 @@ public class SignServlet extends HttpServlet
}
try
{
- HttpSession session = request.getSession();
+ HttpSession session = request.getSession(true);
// not needed, that is done in sign()
// ud.pdfDataSource = PdfAS.applyStrictMode(ud.pdfDataSource);
@@ -360,19 +365,6 @@ public class SignServlet extends HttpServlet
si.pos = sigpos;
// end add
- //added by rpiazzi to change signature block with/without note
- if ((si.note) && (!si.type.contains("NOTE"))) {
- if (si.type.equals(FormFields.VALUE_SIGNATURE_TYPE_DE)) {
- si.type = "SIGNATURBLOCK_DE_NOTE";
- session.setAttribute(SUBMITFORM_SIGNATURE_TYPE_KEY, si.type);
- }
- else {
- si.type = "SIGNATURBLOCK_EN_NOTE";
- session.setAttribute(SUBMITFORM_SIGNATURE_TYPE_KEY, si.type);
- }
- }
- //End added
-
log.info("Putting signature data into session " + session.getId());
session.setAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION, si);
@@ -741,6 +733,13 @@ public class SignServlet extends HttpServlet
ud.pdfDataSource = pdfDataSource;
ud.note = noteEnabled;
+ //Added by rpiazzi
+ if (ud.note && !ud.sig_type.contains("NOTE")) {
+ ud.sig_type += "_NOTE";
+ session.setAttribute(SUBMITFORM_SIGNATURE_TYPE_KEY, ud.sig_type);
+ }
+ //end added
+
return ud;
}