cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Rocha <rica...@apache.org>
Subject Re: How to configure a producer
Date Thu, 17 Aug 2000 08:14:45 GMT
Jochen Wiedmann wrote:
> 
> Hi,
> 
> how do I access the cocoon.properties from within a producer?
> Sorry, if this is something I should know, but I really didn't
> get it from reading the sources.

Given:

  public class MyProducer extends AbstractProducer
    String fileExtension = null;
    . . .
    public void init(Configurations conf)
      throws InitializationException {
      this.fileExtension =
        (String) conf.get("fileExtension");
    }
    . . .
  }

your cocoon.properties should contain:

  producer.type.xxx = MyProducer
  producer.xxx.fileExtension = html


Hope this helps,

Ricardo

Mime
View raw message