cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject AW: how to determine runtime location of resources directory
Date Fri, 17 Aug 2001 05:54:48 GMT
Each sitemap component (generator, transformer etc) gets within
the setup() method the SourceResolver. This object is used
for resolving resources. One task if the SourceResolver is to
map relative definitions to absolute ones.
So if you call resolve("resources") on the SourceResolver
you get a Source object which points to the resources
directory within your cocoon webapp directory.

You can now either choose the getFile() method of the Source
object to get a File object or the getSystemId() to get
a URL string ("file:/..../cocoon/resources")

Carsten

> -----Urspr√ľngliche Nachricht-----
> Von: David Crossley [mailto:crossley@indexgeo.com.au]
> Gesendet: Freitag, 17. August 2001 06:49
> An: cocoon-dev@xml.apache.org
> Betreff: how to determine runtime location of resources directory
>
>
> I have one coding issue that is holding up our
> Cocoon development work. Help please.
>
> What is the Java code to determine the full pathname
> to the runtime location of the resources directory:
>  webapps/cocoon/resources/
>
> Surely there would be an easy way to do this, but
> even after tearing out my remaining hair, i cannot
> figure it out. Please provide a snippet or point to
> a code example.
>
> thanks, David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


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


Mime
View raw message