cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: map:read options
Date Mon, 14 Jan 2008 15:17:22 GMT
Romain Slootmaekers wrote:
> 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

Where *exactly* do you want to put the file? Should it become part of the web 
application or is it located outside?

-- 
Reinhard Pötz                            Managing Director, {Indoqa} GmbH
                           http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair        reinhard@apache.org
_________________________________________________________________________

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


Mime
View raw message