Thanks, I had just figured this out. Same technique. Took me a little while the find the proper spot in the Servlet (remember I'm JAVA-challenged) but have got it working.
Thanks, Pete Allison -----Original Message----- From: Steve Quirk [mailto:[email protected]] Sent: Wednesday, January 07, 2009 12:03 PM To: [email protected] Subject: RE: Servlet Output Filename On Wed, 7 Jan 2009, Pete Allison wrote: > All, > > I cannot figure out how to specify the output filename when calling > FOP from a servlet. I extended the example servlet that came with the distribution. > > I confess I know just enough JAVA to be dangerous, but that didn't > stop me from successfully using FOP. However, on this I'm stumped and > I must be able to allow the user to specify the outfile name. > > I have search the FAQs, the internet, and tried to use setOutfile. I'm not familiar with the servlet example, but normally in a servlet you'd set the content-disposition header: HttpServletResponse aResponse; // assume you have this aResponse.setContentType("application/octet-stream"); aResponse.addHeader("Content-Disposition", "attachment; filename=\"" + aName + ".pdf\""); Steve > > I'm using 0.94. > > Thanks, > Pete Allison > "Do or do not. There is no 'try.' " - Yoda > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
