Re: working with resource.properties files in JSTL Struts
just place a context-param element in your web.xml as a child of web-app. context-param param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name param-valueApplicationResources/param-value /context-param Sven Anthony Mutiso 2 wrote: What is recognized way to get JSTL fmt:message tag to share the same resources bundle as Struts bean:message tag? Thanks Anthony -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: working with resource.properties files in JSTL Struts
Ah, right. That's much simpler for Struts 1.0.2. Except for the fact that Struts has a hand in how locale is determined. For example, the html:html tag or any piece of application code can set the session attribute named Action.LOCALE_KEY to a Locale instance. If set, the bean:message tag uses this when it retrieves a message. So, I guess you'd have to add something like: c_rt:set var=localeKey value=%= org.apache.struts.action.Action.LOCALE_KEY %/ fmt:setLocale value=${sessionScope[localeKey]}/ If the value attribute of fmt:setLocale is null or empty, the runtime's default Locale is used. I believe this matches the bean:message behavior if Action.LOCALE_KEY is not set. Of course, this all just pertains to the case where bean:message attributes for bundle and locale are not used. With 1.1, it looks like things get even hairier... Quoting Sven Bischoff [EMAIL PROTECTED]: just place a context-param element in your web.xml as a child of web-app. context-param param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name param-valueApplicationResources/param-value /context-param Sven Anthony Mutiso 2 wrote: What is recognized way to get JSTL fmt:message tag to share the same resources bundle as Struts bean:message tag? Thanks Anthony -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- Kris Schneider mailto:kris;dotech.com D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
working with resource.properties files in JSTL Struts
What is recognized way to get JSTL fmt:message tag to share the same resources bundle as Struts bean:message tag? Thanks Anthony -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: working with resource.properties files in JSTL Struts
I think something like this worked for me with Struts 1.0.2. Not sure if it will still work with 1.1. c_rt:set var=messageResourcesKey value=%= org.apache.struts.action.Action.MESSAGES_KEY %/ c:set var=messageResources value=${applicationScope[messageResourcesKey]}/ c:set var=messageResourcesConfig value=${messageResources.config}/ fmt:setBundle basename=${messageResourcesConfig} var=messageResourcesBundle/ Quoting Anthony Mutiso 2 [EMAIL PROTECTED]: What is recognized way to get JSTL fmt:message tag to share the same resources bundle as Struts bean:message tag? Thanks Anthony -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- Kris Schneider mailto:kris;dotech.com D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org