I'm still not clear why you're having problems. Here's another small test that
seemed to work:

redir.jsp:

<%@ taglib prefix="c"   uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"; %>
<fmt:setLocale value="fr" scope="session"/>
<c:redirect url="/msg.jsp"/>

msg.jsp:

<%@ page contentType="text/plain" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"; %>
msg: <fmt:message key="msg"/>

So if you hit redir.jsp, you get redirected to msg.jsp which outputs:

msg: fr

Is this essentially what you're trying to do?

Quoting Dima Gutzeit <[EMAIL PROTECTED]>:

> Here is the summary of the behaviour on my side :
> 
> On the first page of the application everything works great. Problem starts
> when I <c:redirect> to another JSP page in the application.
> 
> On this new page , the application totaly "forget" what locale has been set
> nad takes the settings from web.xml
> 
> Both pages are in the same application , sharing the same session.
> 
> Anyone has ideas ?
> 
> ----- Original Message ----- 
> From: "Kris Schneider" <[EMAIL PROTECTED]>
> To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
> Sent: Monday, January 26, 2004 7:16 PM
> Subject: Re: FMT question
> 
> 
> > It seems to work for me. Here's my setup:
> >
> > /WEB-INF/classes/Messages.properties (msg=root)
> > /WEB-INF/classes/Messages_en_US.properties (msg=en_US)
> > /WEB-INF/classes/Messages_fr.properties.properties (msg=fr)
> >
> > web.xml:
> >
> > <context-param>
> >   <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
> >   <param-value>Messages</param-value>
> > </context-param>
> >
> > If my JSP just has this:
> >
> > msg: <fmt:message key="msg"/>
> >
> > It produces:
> >
> > msg: root
> >
> > If I change the JSP to:
> >
> > <fmt:setLocale value="fr" scope="session"/>
> > msg: <fmt:message key="msg"/>
> >
> > It produces:
> >
> > msg: fr
> >
> > Quoting Dima Gutzeit <[EMAIL PROTECTED]>:
> >
> > > I have bundle_en_US as well as bundle_ru_RU. I can not "switch" the fmt
> to
> > > use another locale file during the runtime while changing it in web.xml
> :
> > >
> > > <context-param>
> > >                 <param-name>
> > >                  javax.servlet.jsp.jstl.fmt.locale
> > >                 </param-name>
> > >                 <param-value>
> > >                 en_US
> > >         </param-value>
> > >
> > > and restarting the app works fine.
> > >
> > > ----- Original Message ----- 
> > > From: "Kris Schneider" <[EMAIL PROTECTED]>
> > > To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
> > > Sent: Monday, January 26, 2004 6:27 PM
> > > Subject: Re: FMT question
> > >
> > >
> > > > What property files (resource bundles) are available in your app? Do
> you
> > > have
> > > > either a bundle_en.properties or a bundle_en_US.properties file?
> > > >
> > > > Quoting Dima Gutzeit <[EMAIL PROTECTED]>:
> > > >
> > > > > Dear list members ,
> > > > >
> > > > > I am using to FMT taglibrary for localization of my webapp.
> > > > > Whe defining the locale in the web.xml file everything works just
> fine
> > > but I
> > > > > can not change the locale of default bundle on the fly.
> > > > >
> > > > > Doing this :
> > > > >
> > > > > <fmt:setLocale value="en_US" scope="session"/>
> > > > >
> > > > > does not help. Can anyone point me in the right direction ?
> > > > >
> > > > >
> > > > > Regards ,
> > > > > Dima Gutzeit.
> > > > > ---------------------------------
> > > > > MailVision LTD.
> > > > > R&D Team.
> > > > > Phone: 972-4-8500505 ext. 14
> > > > > Fax: 972 - 4 - 8508000
> > > > > http://www.mailvision.com
> > > >
> > > > -- 
> > > > Kris Schneider <mailto:[EMAIL PROTECTED]>
> > > > D.O.Tech       <http://www.dotech.com/>
> >
> > -- 
> > Kris Schneider <mailto:[EMAIL PROTECTED]>
> > D.O.Tech       <http://www.dotech.com/>

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

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

Reply via email to