i have changed LocaleInterceptor.java..
there is another struts ChangeLocale program which will set locale to session
but it seems not work....help..
public class LocaleInterceptor extends ServerInterceptor
{
/** The logger. */
protected Logger log = Logger.getLogger(getClass());
protected void invoke(ServerInvocation invocation) throws Exception,
InvocationException
{
ServerRequest req = invocation.getRequest();
// Locale locale = req.getContext().getClientRequest().getLocale();
HttpSession session = req.getContext().getClientRequest().getSession();
Locale locale = (Locale)
session.getAttribute"org.apache.struts.action.LOCALE");
log.debug("LocaleInterceptor Locale: "+locale);
if (locale == null){
locale = req.getContext().getClientRequest().getLocale();
log.debug("2. LocaleInterceptor Locale: "+locale);
session.setAttribute("org.apache.struts.action.LOCALE", locale);
}
try
{
req.setLocales(new Locale[]{locale});
invocation.invokeNext();
}
finally
{
req.setLocales(null);
}
}
}
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030465#4030465
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030465
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user