dcsimg
Modifying the name of the file in the download box
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alexandre_Santos
Posted On:   Monday, November 11, 2002 07:51 AM

Hi all!
I've a javascript page that make a pdf document in the fly and download that document. Everything is fine, but I'd like to know how can I modifying the file name in the download dialog box, i.e., when the page display:


"You are downloading the file:
xpto.jsp from ..."


I want to substitute the "xpto.jsp" by "file.pdf".


Thanks for any help,
A. Santos

Re: Modifying the name of the file in the download box

Posted By:   John_Pederzolli  
Posted On:   Monday, November 11, 2002 08:00 AM

Try these two lines:



response.setContentType("application/pdf");




response.setHeader("Content-Disposition", "attachment; filename="xpto.pdf"");
About | Sitemap | Contact