Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Globally change session language (JSTL) through a servlet

Nick White Ro
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic