on 5/31/2000 8:19 PM, Rafal Krzewski at [EMAIL PROTECTED] wrote:
> Instead of starting hacking right away, I took a litle time to think (which
> is usualy a good thing to do) and I figured out, that we could get the
> desired behaviour (WebMacro.properties in an arbitrary location inside
> webapp and template path relative to webapp root) without modyfing
> WebMacro at all!
> This can be done by modyfing TurbineWebMacroService init.
> We could use WM(String config) to pass WebMacro the location
> of the config file, reading the path from the init arg and translating
> using getRealPath, exactly the same way as we do with our
> config file. Then we could use
> ResourceMap rm = ((ResourceBroker)broker).getProvider(Broker.CONFIG);
> to get access to WebMacro's config.
> Then, we could get() TempatesPath, split it, translate each part with
> getRealPath, concatenate and put() it back into the config.
> We could also define an additional parameter in WebMacro.properties,
> which would indicate if this translation should be performed or not.
> All I need to know right now is how do I access Turbine servlet's
> ServletConfig
> object inside TurbineWebMacroService.init() method.
Perfect. I *knew* there was a better way and you found it. :-)
> Right now have single init parameter called 'properties'. If we wish to have
> two parametrs now, we should give them meaningful names. I named
> the parameter 'Turbine.properties' and it worked fine under Tomcat.
> Please note that it doesn't affect the name of the config file itself.
> How should we name these parameters then?
properties == TurbineResources.properties
webmacro.properties == WebMacro.properties
how is that? I would change the Turbine one to be Turbine.propertes, but I
don't want to break existing stuff...
-jon
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]