Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCU-264

Document new possibility of using context path for resolving location of magnolia.properties

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Neutral
    • None
    • None
    • None
    • None

    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

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                ahietala Antti Hietala
                tmattsson Tobias Mattsson
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated: