cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anil <>
Subject cocoon.context.getRealPath & cocoon 2.2
Date Mon, 14 Jan 2008 23:01:52 GMT

Hi -

I was wondering if someone could clear up some confusion for me & point me
in the right direction.

I'm trying to get the full path location of a file from within flowscript as
I need to pass the file location to a spring bean.

In cocoon 2.1 I have seen the cocoon.context.getRealPath("<relative path
from sitemap>") return the correct value, but this doesn't seem to work in
cocoon 2.2 with the new block structure.

I can do:


and get the correct path back from the context - i.e.:


but if I try:


I get no output at all.

Why is this?

To try and get around this problem when passing the file location to my
spring bean I simply tried:

cocoon.context.getRealPath("/xqy/test.xqy") + "/xqy/test.xqy"

but when I instantiate the file object at that location I get a
(The filename, directory name, or volume label syntax is incorrect)

Is this something to do with permissions or something?

Also, if there are any other approaches I could take to try and pass a file
location into a spring bean I'd be very interested in hearing it.

Any help would be very much appreciated.

Many thanks,
View this message in context:
Sent from the Cocoon - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message