I use the following page to set the session Action.LOCALE_KEY to some 
language.  (I know, it could be done differently.)  This works great except 
I get the correct Action.LOCALE_KEY value for every page except 
index.jsp.  Why would that be?  I had this configured before so the index 
page also worked.

Now, if I set the language to, say lang=ko, it works in every page but the 
index page and the index page shows that the session object is different 
than the session object is on every other page.  That is nutty.  Anyone 
have an idea?

<%@ page language="java" import="java.util.*,org.apache.struts.action.*" 
contentType="text/html;charset=utf-8" %>
<%@ taglib uri="template" prefix="template" %>
<%@ taglib uri="bean" prefix="bean" %>
<%@ taglib uri="html" prefix="html" %>
<html:html locale="true">

<%
     String language = null;
     String localeValue = request.getParameter("locale");

     if(localeValue != null) {
        language = localeValue.substring(0, 2);
        response.setContentType("text/html;charset=utf-8");
        Locale newLocale = new Locale(language);
        session.setAttribute(Action.LOCALE_KEY, newLocale);
     }

%>

<template:insert template="../template/template_work.jsp">
   <template:put name="title" content="../title/language_title.jsp"/>
   <template:put name="navigation" 
content="../navigation/standard_navigation.jsp"/>
   <template:put name="content" content="../content/language_content.jsp"/>
</template:insert>

</html:html>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to