cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Pruy <Rainer.P...@Acrys.COM>
Subject Re: set another filename\extension
Date Fri, 21 Mar 2008 09:29:07 GMT
This is not primarily a cocoon issue.
The filename used for "saving a file to disk" is at the discretion of the browser.

HTTP provides "suggesting" a name, but not all  browsers follow such suggestion.

The most reliable way on getting a suitable filename is thus, generating a URL that "ends"
in
the target filename (e.g. via means of redirect from cocoon or at time of generating the Link
in the first place).
(in your example:  foo/getfile?filename=somename.html)

Any approaches to set HTTP headers would be available using some actions and passing parameters
to the serializers
might not convince the bowser to use the expected filename in the end.

Rainer

nanomonk schrieb:
> for example I have:
> _____
> 
> <map:match pattern="foo/getfile">
>     <map:generate src="foo/getfile.xsp" type="serverpages"/>
>     <map:serialize type="file-serializator"/>
> </map:match>
> _____
> it works fine, file is generating and response. But this file have filename
> == "getfile" and without extension. Can I set another filename(or just set
> extension) without changing "foo/getfile"?
> Reason - file is generating according different parameters of request.

-- 
Rainer Pruy
Geschäftsführer

Acrys Consult GmbH & Co. KG
Untermainkai 29-30, D-60329 Frankfurt
Tel: +49-69-244506-0 - Fax: +49-69-244506-50
Web: http://www.acrys.com -  Email: office@acrys.com
Handelsregister: Frankfurt am Main, HRA 31151

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message