• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

PhaseListener: before or after which phase should I set the locale?

 
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I use restfaces an I have UrLs such as mydomain.com/fr/book/etc
where /fr/ is the desired locale. I have tried retrieving the locale string from the URL and setting the locale from a PhaseListener before the renderResponse phase but it does not work i.e. when I change the locale in the address bar to /en/book/etc it will not change the locale. Any clue?
Thanks in advance,
JUlien.

Here is the phase listener:



Here is the managed bean (I actually use spring):


The problem I get is that the jsp page still display today's date in french...
Julien.

I meant "sculpture" instead of "book"
[ July 09, 2008: Message edited by: Julien Martin ]
 
We noticed he had no friends. So we gave him this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic