Uploaded image for project: 'Jetspeed 2 (Retired)'
  1. Jetspeed 2 (Retired)
  2. JS2-116

JSTL fmt tag not picking up locale from request in Tomcat 5.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-dev/cvs, 2.0-a1
    • 2.0-dev/cvs, 2.0-a1
    • i18n and l10n
    • None

    Description

      The JSTL fmt tag is not picking up locale from the J2 request wrappers in Tomcat 5.0. It is always using the english default. This can be seen in the PickANumberPortlet when changing the locale via the LocaleSelectorPortlet.

      To get l10n to work I had to add this line to the pickanumber.jsp page:

      ...
      <fmt:setLocale value="${pageContext.request.locale}" />
      ...

      This is not a solution but does verify that, when the locale is correctly set, the correct bundle is used.

      Since JSTL is part of the 2.4 servlet spec, I have a feeling tomcat is setting the locale much further up in the request. I say this because I can change what language my browser sends and the l10n works fine without the fmt:setLocale tag being used.

      A similar issue is documented on the struts list here:
      http://www.mail-archive.com/taglibs-user@jakarta.apache.org/msg05838.html

      Attachments

        Activity

          People

            weaver Scott Weaver
            weaver Scott Weaver
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: