On 07 Feb 2011, at 19:16, Jörg Schaible wrote:
>
>> If you get a chance though, could you plug your debugger into
>> info.magnolia.cms.servlets.MgnlServletContextListener#initWebappName and
>> info.magnolia.cms.beans.config.PropertiesInitializer#parseStringValue,
>> because afaik, unknown properties (which should be the case for ${webapp}
>> iirc) should not be substituted, and "webapp" should never be empty
>> anyway... ? Just curious.
>
> Both methods work fine in the debugger, the expression is simply kept. I
> tried
> to append "${webapp}/" to the log path and the log files are nevertheless
> still on the same location and are written. The replacement must happen at a
> later stage, probably somewhere when the string is turned into a real path or
> File object ?!?
The substitution happens (should happen) before the string is used (i.e before
a File object is instantiated with it for example), so.. it must be something
else.
You're setting magnolia.exchange.history - strangely, I can't find any usage of
this (see MAGNOLIA-3542 for follow-up).
The magnolia.repositories.home property should however been substituted (it's
used in the default repositories.xml, and this file is "processed") You might
want to plug into
info.magnolia.cms.beans.config.ContentRepository#loadRepositories for further
debunking...
> BTW: The functionality of initWebappName gave me some grieves on the weekend,
> because my Tomcat on production always created a temporary copy of the webapp
> with a prepended numbering ("x-webapp" with x depending on the deploying
> sequence number of the deployed webapps). While you can set the Magnolia
> paths
> to absolute locations by default, it is worse for the configuration itself,
> because "<webapp>/magnolia.properties" is never found. It turned out that the
> behavior in Tomcat was triggered by the "antiResourceLocking" parameter of
> the
> container context (http://tomcat.apache.org/tomcat-6.0-
> doc/config/context.html#Standard_Implementation). It is notable that the
> standard Magnolia war can never initialize its two instances properly if that
> parameter is active.
Yeah - "webapp" is really the folder name, making it useless in several cases
(Jetty generates a semi-random folder name too, for instance)
You probably want to use contextParameters: for an example, have a look at
http://svn.magnolia-cms.com/svn/community/projects/magnolia-community-forums/trunk/magnolia-community-forums-webapp/src/main/webapp/WEB-INF/web.xml
and a sample server.xml (see the Context elements, and their nested Parameter
elements, which are then used to resolve paths to the appropriate
magnolia.properties files as dictated by the value of
magnolia.initialization.file in web.xml)
http://svn.magnolia-cms.com/svn/community/projects/magnolia-community-forums/trunk/magnolia-community-forums-webapp/server-sample.xml
hth,
-g
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------