Solved

In struts how to programmatically set the Locale?

Posted on 2004-08-25
3
208 Views
Last Modified: 2010-05-18
I want to set the Locale that the application must use programmatically and not using LocaleAction...   how could i do that?
0
Comment
Question by:venkks
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 125 total points
ID: 11900290
Try something like:

    session.setAttribute( Globals.LOCALE_KEY, Locale.FRENCH );

That should work :-)
0
 

Author Comment

by:venkks
ID: 11901080
Yes you are right but the actual bug was <html locale="true"> so it wasnt working!  Thanks for the feedback.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11901088
Ahhhh...

Glad you got it working :-)

Tim
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How To Remove a Principal from HttpServletRequest 4 46
spring dependency injection using java config 2 85
dynamic reloading of jsp in jetty 2 119
maven j2ee examles 2 55
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question