diff options
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;
|