diff options
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsParameterExtractor.java | 6 | ||||
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsParameterExtractor.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsParameterExtractor.java index 017eabb2..c8f35f3c 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsParameterExtractor.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsParameterExtractor.java @@ -61,6 +61,7 @@ public class PdfAsParameterExtractor { public static final String PARAM_SIG_POS_R = "sig-pos-r"; public static final String PARAM_SIG_POS_F = "sig-pos-f"; public static final String PARAM_SIG_IDX = "sig-idx"; + public static final String PARAM_FILENAME = "filename"; public static String getConnector(HttpServletRequest request) { String connector = (String)request.getAttribute(PARAM_CONNECTOR); @@ -75,6 +76,11 @@ public class PdfAsParameterExtractor { return transactionId; } + public static String getFilename(HttpServletRequest request) { + String filename = (String)request.getAttribute(PARAM_FILENAME); + return filename; + } + public static String getInvokeURL(HttpServletRequest request) { return (String)request.getAttribute(PARAM_INVOKE_URL); } diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java index 121fbc88..ce19f803 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java @@ -261,6 +261,12 @@ public class ExternSignServlet extends HttpServlet { String locale = PdfAsParameterExtractor.getLocale(request); PdfAsHelper.setLocale(request, response, locale); + String filename = PdfAsParameterExtractor.getFilename(request); + if(filename != null) { + logger.debug("Setting Filename in session: " + filename); + PdfAsHelper.setPDFFileName(request, filename); + } + if(pdfData == null) { throw new PdfAsException("No Signature data available"); } |