you should set the http header content-disposition; I don't
know exactly if that can be easily set in the sitemap but if that doesn't
work you can easily define an action that does it:
response.setHeader("Content-Disposition", "attachment;
filename=yourfile.extension;");
sometimes it also necessary to place a space between "content-"
and "disposition"
Gunter
| "Jain, Neeraj"
<[EMAIL PROTECTED]>
22-10-2004 06:33
|
|
Hi,
I am trying to download a file from server and I have following entry in the sitemap for the same.
<map:match pattern="myURI*">
<map:act type="myURI-action">
<map:read src="" mime-type="application/dbexport"/>
<map:redirect-to uri="{result}"/>
</map:act>
<map:redirect-to uri="cocoon:/main.html?title=error+in+myURI-action"/>
</map:match>
Now, I am able to get the file correctly but the "File Name" field in the file download dialog is a random text. Is there is way to specify this field from my myURI-action class?
Also the "Type" field is blank in the File Download dialog box. Can someone please tell me how can I specify the filename here.
Thanks.
