On Monday 25 October 2004 21:59, Michael Schuerig wrote:

> Ah, good to know! I was unaware that Tomcat substitute properties in
> context.xml. I dumped the properties in my servlet (an axis-based web
> service, actually) and there doesn't seem to be a suitable property
> available. But as I'm using Spring and Log4j anyway, I noticed that
>
> org.springframework.web.util.Log4jWebConfigurer in conjunction with
> org.springframework.web.util.Log4jConfigListener
>
> sets an appropriate property.
[snip]

> It's not pretty, rather fragile, really, as it depends on the right
> order of evaluation. The url attribute must be evaluated after
> mywebservice.root is already set.

Indeed, it's not pretty and it doesn't work :-(
Tomcat keeps its Properties global, not per application instance. Thus, 
when I tried this method yesterday it worked I had another instance of 
my webapp running in the same Tomcat process before. Therefore the 
mywebservice.root property was already set. Then, when I reloaded the 
webapp, the existing property is substituted for the variable in 
context.xml. Alas, when the web app is started for the first time, the 
property is not set.

Michael

-- 
Michael Schuerig                 Not only does lightning not strike
mailto:[EMAIL PROTECTED]       twice, it usually doesn't strike once.
http://www.schuerig.de/michael/  --Salman Rushdie, Fury

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to