diff options
author | rpiazzi <rpiazzi@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2012-02-14 10:22:08 +0000 |
---|---|---|
committer | rpiazzi <rpiazzi@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2012-02-14 10:22:08 +0000 |
commit | 9c717316d28f90b3117df09b467f561fb84df62c (patch) | |
tree | d6ce3944998af071f9d75947cc19b7b6061b5dda /pdf-as-web/src/main/java/at/gv | |
parent | d2fc89b90beaa8b5b9177f4c295e30f2da4b0034 (diff) | |
download | pdf-as-3-9c717316d28f90b3117df09b467f561fb84df62c.tar.gz pdf-as-3-9c717316d28f90b3117df09b467f561fb84df62c.tar.bz2 pdf-as-3-9c717316d28f90b3117df09b467f561fb84df62c.zip |
Added workaround: For external application pdf-as now gets directly from session and not from SignSessionInformation, which always is null
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@917 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java index dced4c9..60c5d41 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ProvidePDFServlet.java @@ -43,6 +43,7 @@ import org.apache.commons.logging.LogFactory; import at.gv.egiz.pdfas.web.FormFields;
import at.gv.egiz.pdfas.web.PDFContainer;
+import at.gv.egiz.pdfas.web.servlets.SignServlet;
import at.gv.egiz.pdfas.web.helper.SignServletHelper;
import at.gv.egiz.pdfas.web.session.SessionAttributes;
import at.gv.egiz.pdfas.web.session.SignSessionInformation;
@@ -112,8 +113,10 @@ public class ProvidePDFServlet extends HttpServlet { SignServletHelper.disableBrowserCacheForResponse(response);
response.setContentType("application/pdf");
response.setContentLength(pdf.length);
- SignSessionInformation si = (SignSessionInformation)session.getAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION);
- response.setHeader("Content-disposition", "attachment; filename=\""+si.filename+"\"");
+ //SignSessionInformation si = (SignSessionInformation)session.getAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION);
+ String filename = (String)session.getAttribute(SignServlet.SUBMITFORM_FILENAME_KEY);
+
+ response.setHeader("Content-disposition", "attachment; filename=\""+filename+"\"");
InputStream is = new ByteArrayInputStream(pdf);
final int bufferSize = 1024;
|