anil pisze:
> 
> Hi -
> 
> Just to update this posting with my investigations - I've managed to extract
> the file contents within my spring bean.
> 
> The basic problem was the way I was creating the file object - the path
> returned by the cocoon.context.getRealPath() method was a URI & when
> instantiating my File object I needed to create a URI object first.
> 
> Therefore it was:
> 
> URI fileURI = new URI("<output of cocoon.context.getRealPath>");
> File file = new File(fileURI);
> 
> rather than just new File("<output of cocoon.context.getRealPath>");
> 
> Sorry - I should have noticed this - I assumed that I should be able to pass
> the abstract path into File object directly - I blame it on the late nights!
> 
> One thing I still don't really understand though is that I'm still unable to
> get a path to the resource that I want to access through my spring bean as
> cocoon.context.getRealPath("xqy/test.xqy") still returns null. In order to
> get round this I do:
> 
> var fullPath = cocoon.context.getRealPath("/") + "xqy/test.xqy";
> 
> If anyone could clear up that confusion I'd be very grateful.

It looks like a bug. Submit a bug report, please. It would be the best if you 
could create a simple
block exhibiting this problem and attach to the issue (this will shorten a time 
needed for devs to
take a look at it for sure) but it's not a requirement of course.

-- 
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to