cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Slootmaekers <rom...@inuron.com>
Subject Re: map:read options
Date Mon, 14 Jan 2008 14:40:15 GMT
Robin Wyles wrote:
> Hi Romain,
>
> On 14 Jan 2008, at 13:40, Romain Slootmaekers wrote:
>
>> Hi,
>>
>> I've been trying to use map:read to read a file from a location on 
>> the fs outside the cocoon root.
>>
>> http://cocoon.apache.org/2.2/core-modules/core/2.2/846_1_1.html
>> is rather sparse, but I tried:
>>
>> <map:match  pattern="**.msi">
>>                <map:read type="resource"
>>                    src="installer.msi"
>>                    mime-type="application/octet-stream" />
>> </map:match>
>>
>>
>> and alternatives with ../ ./ / aso. nothing seems to work with mvn 
>> jetty:run-war)
>>
>> The question is: can I use map:read for this, or need I write a 
>> little servlet ?
>
>
> I think you should be able to, have you tried using an absolute path 
> to the file like so?
>
>  <map:read type="resource"
>                    src="/absolute/path/to/your/file/installer.msi"
>                    mime-type="application/octet-stream" />
>
Yes the file:///C:/some path/installer.msi works

but I would like to have a relative path as the app needs to be relocatable


Romain.

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


Mime
View raw message