Hi,
I am currently developing a set of applications that will all run in a single instance of a JBoss container (version 4.5). The applications have no shared code, but do have different Locales. Here are some (made-up) examples of what the applications / locales could be:
1. mywebsite.com
2. hablainglese.es
3. meingott.de
4. heisannhoppsan.no
None of these applications are internationalized, and it is wort stressing that I am not enquiring about traditional internationalization (one app, many languages, locale determined by web browser OS settings at request time). Rather, this is a question of how to run multiple sites with different server locales on a single JBoss instance.
I have allready had a go at this, but I have not been succesfull in getting it to work. Here is the code that is not working:
In my servlet startup initialization:
...
Locale.setDefault(Locale.F
RENCH);
...
My JSP:
<%@ page language="java" pageEncoding="UTF-8" session="true"%>
<%@ page import="java.util.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Internationalization Test </title>
</head>
<body>
<h1>Country: <%=Locale.getDefault().get
Country()%
></h1>
<h1>Language: <%=Locale.getDefault().get
Language()
%></h1>
</body>
</html>
I think this approach is flawed, as the last servlet to be initialized would set the same default locale for all applications running on the server.
Any ideas?
Henrik
PS! your timezone selector for this form at ('
http://www.experts-exchange.com/newQuestionWizard.jsp') is impossible to use. I can't find London / GMT !
Start Free Trial