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.
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.
String s = getMessage((Locale)session.getAttribute(localeKey), key);