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

Set a LocalizationContext in javax.servlet.jsp.jstl.core.Config to ensure JSP reads message-bundle-files with same encoding (UTF-8) like freemarker

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Fix
    • Neutral
    • None
    • 5.2.8, 5.3.3
    • None
    • None

    Description

      Recently when testing some i18n-support for templating, i realized, that in freemarker-context, a properties-file is read with UTF-8 (see DefaultMessagesImpl#getBundle), but in JSP-context, JSTL expects ISO-8859-1 encoding.
      That means: When you want to use the same resource-bundle for both freemarker- and jsp-templates, you have to encode everything the \u1234 -way.
      Anyway, since http://jira.magnolia-cms.com/browse/MAGNOLIA-5652 and since new i18n-usage, we don't encode texts in resource-bundles anymore.

      By plugging into the JSP i18n handling and delegate resolution into Magnolia code we can ensure both jsp and freemarker are reading the bundles with same encoding.
      To do so, we should set a LocalizationContext in javax.servlet.jsp.jstl.core.Config

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                cmeier Christoph Meier
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD