2013/7/31 Antonio Sánchez <[email protected]>:
> At logging out, session is invalidated and redirected page is displayed in
> default language.
>
> Say: default language: Spanish; current language: English; logging out and
> resulted page is in Spanish, but should be English. .
>
> This is not working (code in action class):
>
> public String closeSession() {
> Locale currentLocale = ActionContext.getContext().getLocale();
> request.getSession().invalidate();
> ActionContext.getContext().setLocale(currentLocale);
> return SUCCESS;
> }
>
> How to maintain the current language?
Redefine redirect to include request_locale parameter, ie:
<param name="request_locale">${currentLocale}</param>
and add getter to action with closeSession()
public String getCurrentLocale() {
return CURRENT_LOCALE.toString();
}
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]