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]

Reply via email to