cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DURDINA Michal <durd...@asset.sk>
Subject How to access sourceResolver in configure() method in action
Date Wed, 28 May 2003 17:46:33 GMT
Hello!

I am using own ConfigurableComposerAction and I have problem with loading
configuration from external file (from filesystem).

In act() method, I would use SourceResolver from parameter passed 
to this method, but in configure() method I do not know where should 
I get the sourceresolver from.

I am using Cocoon 2.0.4 with compiled sitemap, thus I cannot use this:
    
  public void compose(ComponentManager manager) throws ComponentException {
        this.manager = manager;
        this.resolver = SourceResolver)manager.lookup(SourceResolver.ROLE);
  }

I have my action in mounted sitemap and sourceResolver from act method
works in the context of the sitemap directory.
If my mounted sitemap is located in directory 'subsitemap' and I use action
in mounted sitemap, correct resolving of 'myconfig.xml' should be

d:/jboss/server/default/deploy/webapp.war/subsitemap/myconfig.xml

but via Context or Environment (which I get get when I implement
Contextualizable)
I only get my file resolved as 

d:/jboss/server/default/deploy/webapp.war/myconfig.xml - what is wrong.

Do you know any way how to get the same environment object as that which is
passed by SitemapManager to the act() method for actions located in
the mounted sitemap?
Maybe I could get it from ComponentManager by some role?

Thank you,
Michal

Mime
View raw message