You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jochen Wiedmann <jo...@ispsoft.de> on 2000/08/17 10:11:01 UTC

How to configure a producer

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.


Bye,

Jochen

Re: How to configure a producer

Posted by Ricardo Rocha <ri...@apache.org>.
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