cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doody, John" <john.do...@attws.com>
Subject RE: Properties file specification for custom producer
Date Tue, 08 Aug 2000 19:59:45 GMT
We'll we can't go to servlet 2.2 yet, so looks like I'll have to go with
with your second option.  I'm not really fond of having to hack Cocoon.  I
haven't even looked at the source.  Where would I start hacking.

Thanks for you help on this problem.

John

> ----------
> From: 	Robin Green[SMTP:greenrd@hotmail.com]
> Reply To: 	cocoon-users@xml.apache.org
> Sent: 	Tuesday, August 08, 2000 1:06 PM
> To: 	cocoon-users@xml.apache.org
> Subject: 	RE: Properties file specification for custom producer
> 
> In Cocoon 1.7.4 a Producer is only an Actor, so it is not supplied with a 
> Configurations object (only a Director from which you can get instances of
> 
> the cocoon components like Processors, Formatters etc.) - so your init() 
> method will never be called.
> 
> If you are using a servlet 2.2 API compatible servlet runner, you can
> store 
> your configuration in web.xml instead, and use this (have not tested it so
> 
> it may be buggy):
> 
>   public void init (Director director) {
>     ServletContext context = (ServletContext) director.getActor
> ("context");
>     myparm1 = context.getInitParameter ("myparm1");
>     // ...
>   }
> 
> Or you can hack Cocoon to pass through the Configurations object. I had to
> 
> do that in part of Cocoon to get class auto reloading to work (those 
> modifications I still haven't posted, but intend to some day!).
> 
> Clearly the design of Cocoon 1 isn't perfect - but that's why Cocoon 2 is 
> being developed! :)
> 
> 
> --
> Robin Green
> i-tao Ltd.
> 4 Skyline Village
> Limeharbour
> London E14 9TS
> United Kingdom
> Phone +44 20 7537 2233  Fax +44 70 8081 5118
> http://www.i-tao.com
> 
> 
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Mime
View raw message