troubleshooting Question

Struts: Overwriting locale in the request

Avatar of heppa
heppaFlag for Luxembourg asked on
JSPWeb Applications
7 Comments1 Solution5792 ViewsLast Modified:
We are using Struts 1.1 (i know, it's old, but it's a constraint) to build a web application. We also have for 3 languages. Due to political decisions I am supposed to "remove" multilanguage support quickly, meaning that the application won't react on the given locale. My problem is, that it always reacts on the locale given in the request on first access.

I tried to set a fix locale to the session, both with setLocale(java.util.Locale) method as well as setting it to the session directly in the Action Delegation class (we have a GenericAction with an abstract method executeTask that extends Action and all other Actions are extending GenericAction). Both didn't have an effect on first request.

It is really the only option NOT to include the in the war in order to fall back to english all the time, even if the browser locale is set to, say, de_DE?

I appreciate any help very much, as I just started to try to understand Struts. It normally works out quite well, but this does not make sense to me. I thought, the setLocale method would have this exact purpose. Thanks a lot in advance.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros