cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject [Flowscript] Obtaining servlet context directory
Date Wed, 10 Dec 2003 09:24:20 GMT
Hi Cocoon users,

I'm looking for an easy way to obtain the directory
of the servlet context in a flowscript. Is there any
reason why context.getRealPath() in FOM_Cocoon is not
(yet?) implemented?

By now I'm doing


var sourceResolver = cocoon.getComponent(
     Packages.org.apache.excalibur.source.SourceResolver.ROLE);

var source = sourceResolver.resolveURI("context:///");
var sourceFile =
     Packages.org.apache.excalibur.source.SourceUtil.getFile(source);
var contextPath = sourceFile.getAbsolutePath();

sourceResolver.release(source);
cocoon.releaseComponent(sourceResolver);


Is there something shorter and more elegant?

Thanks in advance,
-- Andreas


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


Mime
View raw message