• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Globally change session language (JSTL) through a servlet

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a web application that uses JSTL for localization.

I want to be able to change the session language everywhere in the application.
For this, I use a servlet that is called by this url:.

This is what the servlet does:



It works just fine, but I'm not sure if that session attribute is always the same, or it's implementation specific.
It would be better if I used the constant that holds that name.

So far, looking through the API, I only found javax.servlet.jsp.jstl.core.Config.FMT_LOCALE, which has the value "javax.servlet.jsp.jstl.fmt.locale", but using that doesn't change the language.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!