Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

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
Boost this thread!