Adam, try editing this (it works for me when I am downloading a jar file in terms of the name of the file. It should with some editing work for your pdf)
You can also do the equivalent in your struts.xml if you want to.

@Results({
   @Result(name="success", type="stream",
params={"contentType", "application/octet-stream", "contentDisposition", "attachment;filename=\"petersen-3.1.3.jar\"" } )
 })


adam pinder wrote:
can't you specify a filename in the result config in the struts.xml file, albeit it the same for each result.


----------------------------------------
Date: Wed, 14 Apr 2010 09:57:54 +0800
From: haoniu...@gmail.com
To: user@struts.apache.org
Subject: Re: struts & PDF

You can't. One alternative is to save the file in another directory and
redirect to it.

fea jabi wrote:
On click of a button I open a window and generating PDF in it as "inline" 
within that browser window. It works fine.



I did set the http response header for the response with the file name. So, I 
am seeing the right PDF name in the open/save dialog of PDF.



But when I click on the save button in PDF within the browser or File|Save of the browser 
the file name in the save dialog is the "struts action name.pdf" instead of the 
http response header file name that I set.



How to get the file name set to the header of http response in the save dialog 
instead of the struts action name.pdf?





Thanks.



_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
_________________________________________________________________
http://clk.atdmt.com/UKM/go/195013117/direct/01/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to