Hi,
I haver never worked with struts MessageResources.
This is the first time.How do I get a messageResource object ?
I know we have the following way to get it ..
//Returns a resource bundle for the locale specified in the request,
MessageResources messageResources = getResources(request);
but it means I have to store locale in every request?Moreover I would have liked to get it from the session since my locale is there.
Any suggestions?
Thanks
Ash
-
MesasegResource in struts (2 messages)
- Posted by: Ash H
- Posted on: September 29 2004 09:35 EDT
Threaded Messages (2)
- MesasegResource in struts by Nathan Comstock on September 29 2004 14:53 EDT
- correciton by Nathan Comstock on September 29 2004 14:56 EDT
-
MesasegResource in struts[ Go to top ]
- Posted by: Nathan Comstock
- Posted on: September 29 2004 14:53 EDT
- in response to Ash H
Have you tried using the methods which take a Locale as a parameter,
such as public String getMessage(Locale locale, String key) ?
getMessage((Locale)session.getAttribute(localeKey)); just a thought. -
correciton[ Go to top ]
- Posted by: Nathan Comstock
- Posted on: September 29 2004 14:56 EDT
- in response to Nathan Comstock
correction.
String s = getMessage((Locale)session.getAttribute(localeKey), key);