my dog learned polymorphism*
The moose likes Servlets and the fly likes getCharacterEncoding / getLocale Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "getCharacterEncoding / getLocale" Watch "getCharacterEncoding / getLocale" New topic

getCharacterEncoding / getLocale

Siamak Saarmann
Ranch Hand

Joined: Aug 21, 2004
Posts: 77

I have problem with above methods. I appereciate your help.

1- I have a problem with getCharacterEncoding.

If I do not use setCharacterEncoding I always get "null" from getCharacterEncoding.

2- If I setLocale on reponse or request I get desired locale if I use getLocale. But if I do not setLocale and just want to see what Locale is set on user's browser, I always get en_US.

Are above things normal?


PhD Candidate: Distributed and Parallel Systems, Simulation and Modeling
leon fan

Joined: Aug 02, 2004
Posts: 19
Did you set other language rather than english as prefer language in your browser when you try to access your jsp by browser?
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17249

Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it


Thanks! and welcome to the JavaRanch!


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Consider Paul's rocket mass heater.
subject: getCharacterEncoding / getLocale
Similar Threads
JSF and Locale
[JSF 1.2 and 2.0/Internationalization] How to propagate the Locale to the entire application
determine the input type of the value of the function parameter map
xxxCharacterEncoding methods.....
I18n problems with JSF