BUT i can't stop gathering more information (must be a kind of addiction) ;-)
<message-resources key="tst" parameter="test" /> in struts-config.xml and <bean:message bundle="tst" key="message" /> works (i found that out of my own without any help! i am very proud *ggg*)
my questions for now:
1) in which scope does <message-resource ... /> store the message resource? 2) is it possible to access this message resource due EL and how?
3) does <fmt:message bundle="${scope.ctx}" /> need a LocalizationContext or does it also work with a message resource
thanks for your help so far.
i am climbing the learning curve. *lol*
-------------------------------------------------------------------------- sorry i can't stop asking questions. something forces me to keep on asking
Adam Hardy wrote:
On 10/17/2003 02:17 PM Kris Schneider wrote:
One approach you could take would be to create your set of alternate LocalizationContext instances at application startup and store them in application scope:
ResourceBundle countriesBundle = ResourceBundle.getBundle("countries", locale);
LocalizationContext countriesCtx = new LocalizationContext(countriesBundle, locale);
servletCtx.setAttribute("countriesCtx", countriesCtx);
ResourceBundle statesBundle = ResourceBundle.getBundle("states", locale);
LocalizationContext statesCtx = new LocalizationContext(statesBundle, locale);
servletCtx.setAttribute("statesCtx", statesCtx);
Then, in your JSP:
<fmt:message bundle="${applicationScope.countriesCtx}" key="message.test">
<fmt:message bundle="${applicationScope.statesCtx}" key="message.test">
in web.xml this will set up one as the default so you only need to programmatically set up the others, so at least for the most-used bundle you won't have to specify the 'bundle' attribute:
<context-param> <param-name> javax.servlet.jsp.jstl.fmt.localizationContext </param-name> <param-value>ApplicationResources</param-value> </context-param>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

