Hi Martin, Thanks for the response. I use struts as the controller in my webapp (for my Action classes). When you say struts and jstl should not be mixed are you talking about the view? In my jsps I use jstl and struts-el. This is where I should be sticking to one approach? I don't understand how jstl can pick up the correct resources when I don't use struts.
Kumar Please respond to "Tag Libraries Users List" <[EMAIL PROTECTED]> To: Tag Libraries Users List <[EMAIL PROTECTED]> cc: Subject: Re: fmt:message not using correct locale JSTL and Struts use different mechanisms to load their resource bundles, and cache them under different attribute keys, so it's not surprising that JSTL tags do not pick up Struts resource bundles. I would recommend that you pick one approach and stick with it, rather than trying to mix the two approaches. -- Martin Cooper On Fri, 15 Oct 2004 15:23:37 -0600, Kumar V Kadiyala <[EMAIL PROTECTED]> wrote: > Hello, > > I have a webapp which uses struts and jstl. I use the following code > snippet to display localized strings > > <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> > <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> > <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el"%> > <fmt:message key="label.help"/> > > My resource file is specified in struts-config.xml as follows: > <message-resources parameter="com.ibm.psdui.resources.PSDText"/> > I currently have the base file PSDText.properties and a German version > PSDText.properties_de. > > If I have the language setting in my browser to de, I see the German > strings. However if I set the languages to en-us followed by German, I > still see the German strings. It seems like fmt:message is using the wrong > locale. Just out of curiosity I replaced fmt:message to bean:message and I > see the right localized strings. I have to use fmt:message. Am I missing > some configuration setting or something? > > Thanks in advance, > Kumar > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]