cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject Re: web.xml init-params
Date Mon, 17 Nov 2003 21:27:22 GMT
Jeremy Quinn wrote:

> Hi All
> I am trying to access init-params from web.xml, in a FlowScript, and 
> all I get are nulls.
> I try this:
> var smtpHost = cocoon.context.getInitParameter ("smtp-host");
> with this in my web.xml:
>     <init-param>
>       <param-name>smtp-host</param-name>
>       <param-value></param-value>
>     </init-param>
> I can't get any of the init-params from web.xml ....
> Any suggestions?

'Fraid it's not that simple. If you look at the code in the 
CocoonServlet, I think you'll see that each init param is handled 
independently, with the init parameters being put into the app context 
within the init method. Unless you're prepared to subclass the 
CocoonServlet, I think you're going to have to find another way of 
getting hold of your initialisation parameters.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message