cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Crabtree" <Paul.Crabt...@dna.co.uk>
Subject RE: [flow] resolving relative paths
Date Wed, 26 Nov 2003 16:40:42 GMT
Cracked it. found this example:

var resolver =
cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolve
r.ROLE);
var source = resolver.resolveURI(path);

which if the source is a file it is a FileSource which has an exists()
method. perfect.


-----Original Message-----
From: Paul Crabtree 
Sent: 26 November 2003 15:47
To: users@cocoon.apache.org
Subject: [flow] resolving relative paths


Hi.

Im trying to use the exists() method of java.io.File to check something
when using flow, that bit works fine but im unable to resolve my
relative "to sitemap" path into something which File understands. In JSP
i used to use application.getRealPath(), is there something similar i
can use inside flow?

I've seen SourceResolver.resolveURI(uri) but im not sure if thats what i
need as i dont need a Source but a file.

Does anyone have any suggestions? thanks.

Paul

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


_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed
Scanning Services - powered by MessageLabs. For further information
visit http://www.mci.com

_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed
Scanning Services - powered by MessageLabs. For further information
visit http://www.mci.com

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


Mime
View raw message