[DOCU-264] Document new possibility of using context path for resolving location of magnolia.properties Created: 26/Mar/12  Updated: 03/Nov/15

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Tobias Mattsson Assignee: Antti Hietala
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MAGNOLIA-3094 Also use contextPath when resolving m... Closed

 Description   

As of 4.5.2 its possible to use also the contextPath as a variable when locating the magnolia.properties file.

The context path is the part of the URL that Magnolia is housed at. For instance in http://domain.com/magnoliaPublic, the context path is /magnoliaPublic.

When Magnolia runs without a context path, at http://domain.com/ then we have the variable set to "ROOT".

The new defaults are (tested in this order until a file is found):

  <context-param>
    <param-name>magnolia.initialization.file</param-name>
    <param-value>
      WEB-INF/config/${servername}/${contextPath}/magnolia.properties,
      WEB-INF/config/${servername}/${webapp}/magnolia.properties,
      WEB-INF/config/${servername}/magnolia.properties,
      WEB-INF/config/${contextPath}/magnolia.properties,
      WEB-INF/config/${webapp}/magnolia.properties,
      WEB-INF/config/default/magnolia.properties,
      WEB-INF/config/magnolia.properties
    </param-value>
  </context-param>

Described in current documentation at:
http://documentation.magnolia-cms.com/administration/deployment/war-file-with-multiple-configurations.html
http://documentation.magnolia-cms.com/technical-guide/configuration-mechanisms.html
http://documentation.magnolia-cms.com/reference/configuration.html
http://documentation.magnolia-cms.com/reference/properties.html



 Comments   
Comment by Ruth Stocks [ 12/Jun/12 ]

Updated page sections at

Generated at Mon Feb 12 01:07:29 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.