Michel Thadeu wrote:

Hi guys!

I want to change the name of a response, i working on a way to a
servlet acts as a file to download, I call the servlet with the proper
request values, then I change the content-type to octet-stream and then
print the proper data...

My problem is that I know what type of file I will send (if it will be
a .txt, .pdf, .tgz or anything else) but I don�t know the way call the
response with the proper name, if there is that way.

done recently, you are a lucky guy :) here's there the code snippet
taken from my download.py servlet:

response.setHeader('Content-Type', str(mimeType))
response.setHeader('Content-Length', '%d' % len(data))
response.setHeader('Content-Disposition', 'attachment; filename=%s' % str(name))


self.write(data)



cheers,
deelan





-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to