1 Reply Latest reply on Oct 9, 2005 12:44 PM by Raja

    Setting locale for a session

    Heikki Pernu Newbie


      Is there a way to setup a locale for a single web session?

      By following a Sun JSF tutorial, I have been able to set the locale
      for a single JSF page. However, after changing the page, the locale
      no longer applies and the default locale is used instead.

      This was found on the net:
      http://forum.java.sun.com/thread.jspa?threadID=643181&messageID=3790390

      but it seems like a hack.

      Is there nothing simpler? Is it really true that such a thing is not
      supported by J2EE infrastructure or Jboss?

      A typical scenario would be where a user selects a language upon
      entering a web site and the language is then used for all pages
      viewed during that visit.

        • 1. Re: Setting locale for a session
          Raja Master

          We have a similar web app thats served in multiple languages and the way we do it have a filter equivalent that will llook up the Browser language and set up the Locale accordingly for every request. This needs to be set for every request as the user can switch languages between page hits.