• Post Reply Bookmark Topic Watch Topic
  • New Topic

Globally change session language (JSTL) through a servlet  RSS feed

 
Nick White Ro
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!