You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rita Brito <rb...@itclinical.com> on 2019/02/20 12:21:25 UTC
i18n Interceptor cookie
Hi,
I am defining an i18n interceptor with <param
name="localeStorage">cookie</param> so that a cookie with the user's
selected language is stored.
Everything is working fine if when I navigate in my domain (eg:
my.domain.com/somepage.html).
However, when navigating to a subdomain (eg:
my.domain.com/subdomain/somepage.html), a new cookie is created with
path=/subdomain and the previous one (path=/) is not overriden, due to
having different paths (despite having the same name).
My question is: is there a way of defining the cookie path other than
having a custom i18n interceptor?
Kind regards and thanks in advance,
--
Rita Brito
Software Developer, ITClinical
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: i18n Interceptor cookie
Posted by Lukasz Lenart <lu...@apache.org>.
śr., 20 lut 2019 o 13:21 Rita Brito <rb...@itclinical.com> napisał(a):
> I am defining an i18n interceptor with <param
> name="localeStorage">cookie</param> so that a cookie with the user's
> selected language is stored.
>
> Everything is working fine if when I navigate in my domain (eg:
> my.domain.com/somepage.html).
>
> However, when navigating to a subdomain (eg:
> my.domain.com/subdomain/somepage.html), a new cookie is created with
> path=/subdomain and the previous one (path=/) is not overriden, due to
> having different paths (despite having the same name).
>
> My question is: is there a way of defining the cookie path other than
> having a custom i18n interceptor?
Sorry but not. You must redefine the interceptor and feel free to open
a ticket in JIRA to cover this case.
If overriding the interceptor you must just override the
"getLocaleHandler" method and implement your own "LocaleHandler".
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org