diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-02-05 10:30:30 +0100 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-02-05 10:30:30 +0100 |
commit | a8183a22b3a5bd9b062a1cded09a75ec8fa3be8e (patch) | |
tree | 5f1ec1ebc6fc343eacd85212efff1655316af250 /pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper | |
parent | fe8409ea3ebbb34058eeb5c2f0a6977b8a421686 (diff) | |
download | pdf-as-4-a8183a22b3a5bd9b062a1cded09a75ec8fa3be8e.tar.gz pdf-as-4-a8183a22b3a5bd9b062a1cded09a75ec8fa3be8e.tar.bz2 pdf-as-4-a8183a22b3a5bd9b062a1cded09a75ec8fa3be8e.zip |
Fixed signature data hash verification, Pdf Download document name
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java index 77c31c9a..12d7ffc5 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java @@ -64,6 +64,7 @@ public class PdfAsHelper { private static final String PDF_PDFDATA_PAGE = "/PDFData"; private static final String PDF_DATAURL_PAGE = "/DataURL"; private static final String PDF_ERR_URL = "PDF_ERR_URL"; + private static final String PDF_FILE_NAME = "PDF_FILE_NAME"; private static final String PDF_INVOKE_URL = "PDF_INVOKE_URL"; private static final String REQUEST_FROM_DU = "REQ_DATA_URL"; private static final String SIGNATURE_DATA_HASH = "SIGNATURE_DATA_HASH"; @@ -627,17 +628,33 @@ public class PdfAsHelper { } public static void setSignatureDataHash(HttpServletRequest request, String value) { - request.setAttribute(SIGNATURE_DATA_HASH, value); + HttpSession session = request.getSession(); + session.setAttribute(SIGNATURE_DATA_HASH, value); } public static String getSignatureDataHash(HttpServletRequest request) { - Object obj = request.getAttribute(SIGNATURE_DATA_HASH); + HttpSession session = request.getSession(); + Object obj = session.getAttribute(SIGNATURE_DATA_HASH); if (obj != null) { return obj.toString(); } return ""; } + public static void setPDFFileName(HttpServletRequest request, String value) { + HttpSession session = request.getSession(); + session.setAttribute(PDF_FILE_NAME, value); + } + + public static String getPDFFileName(HttpServletRequest request) { + HttpSession session = request.getSession(); + Object obj = session.getAttribute(PDF_FILE_NAME); + if (obj != null) { + return obj.toString(); + } + return "document.pdf"; + } + public static void setSignatureActive(HttpServletRequest request, boolean value) { request.setAttribute(SIGNATURE_ACTIVE, new Boolean(value)); } |