You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Frank Taffelt <fr...@interface-business.de> on 2000/10/09 15:54:00 UTC

Access to cocoon.properties from processor

Hi,

is it possible to access cocoon.properties from my own processor ?
i want to create my own parameter section and read my processor dependant
parameters.

do you have any example code, to do this ?

regards,
Frank





How to include (html,php,shtml) code pages to generated by Cocoon pages.

Posted by Krzysztof Zieliñski <KZ...@supermedia.pl>.
Hello.

I want to include into my pages generated by Cocoon other pages in HTML,
SHTML, PHP.

I think that I should use XInclude and all included (HTML-XHTML, SHTML, PHP)
documents should be valid xml documents. So I have to modify included (eg.
HTML to XHTML).


Is there any easier method to do this.

Krzysztof Zielinski
KZielinski@SuperMedia.pl
ICQ # 47933362



RE: Access to cocoon.properties from processor

Posted by Cédric POTHIN <ce...@inovatel.com>.
Hi,

you have to implement Configurable interface
which have init(Configuration) method. Therefore
you can overwrite init(Configuration) like this

Processor myProcessor {

  public void init(Configuration conf) {

	String paramInCocoonProperties = conf.get("param","defaultvalue");

  }

...

  public Document process() {
  }
}


Cedric POTHIN

-----Message d'origine-----
De : Frank Taffelt [mailto:frank.taffelt@interface-business.de]
Envoyé : lundi 9 octobre 2000 15:54
À : cocoon-users@xml.apache.org
Objet : Access to cocoon.properties from processor


Hi,

is it possible to access cocoon.properties from my own processor ?
i want to create my own parameter section and read my processor dependant
parameters.

do you have any example code, to do this ?

regards,
Frank





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




RE: Access to cocoon.properties from processor

Posted by Cédric POTHIN <ce...@inovatel.com>.
Hi,

you have to implement Configurable interface
which have init(Configuration) method. Therefore
you can overwrite init(Configuration) like this


Processor myProcessor extends AbstractActor
  implements Processor, Configurable, Status {

  public void init(Configuration conf) {

	String paramInCocoonProperties = conf.get("param","defaultvalue");

  }

...

  public Document process(Document document, Dictionary parameters)
    throws Exception {

....
  }
}


Cédric POTHIN




Hi,

is it possible to access cocoon.properties from my own processor ?
i want to create my own parameter section and read my processor dependant
parameters.

do you have any example code, to do this ?

regards,
Frank





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