From within a JSP page can I obtain the locale of the remote client?

Simon Brown

Yes, you can get the "preferred" locale of the remote client by calling the getLocale() method on the request object. The preferred locale is determined by information in the HTTP request sent to the server. i.e.

Locale loc = request.getLocale();
If you would like to know all the locales that the client can accept (in decreasing order of preference), then you can call the getLocales() method instead. This returns an enumeration.