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" />
or maybe even:
<map:read type="resource"
src="file:///absolute/path/to/your/file/
installer.msi"
mime-type="application/octet-stream" />
Robin
smime.p7s
Description: S/MIME cryptographic signature
