Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3094

Also use contextPath when resolving magnolia.properties files at startup

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 4.5.2
    • None
    • core

    Description

      When looking up magnolia.properties [1] files, we're using the current host name, as well as the webapp folder name (i.e the last element of the path in which the webapp is deployed) - which is not necessarily the servlet context path for the webapp.

      Using the webapp's context path might help in a bunch of situations (while developing I often have a context path differing from the webapp's name. same goes when deploying multiple apps under different vhosts of a single tomcat, for instance; some appservers deploy their webapps in folder whose name doesn't correspond to the contextPath either)

      Unfortunately, javax.servlet.ServletContext#getContextPath is only available since the 2.5 version of the Servlet API. Can we update ?

      (marking this as fix-for 4.3, only in the case we can quickly decide on upgrading the servlet api dependency, in which case adding this should be trivial)

      [1] http://documentation.magnolia-cms.com/cookbook/using-a-single-war-file-with-multiple-configurations.html

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                tmattsson Tobias Mattsson
                gjoseph Magnolia International
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD