struts2 - UrlRewriteFilter skipping i18n Interceptor in Struts 2 -
i managed have struts 2 i18n interceptor working change session locale. it's working if call directly action, example:
https://localhost:8443/loadclientlogin.action?request_locale=fr
but if use urlrewritefilter map rule, calls action, seems 18n interceptor skipped, since locale not changed.
this url rewriter's rule wrote action:
<rule> <from>^/client/login(\??)(.*)$</from> <to type="forward">/loadclientlogin.action$1$2</to> </rule>
and url use change locale:
https://localhost:8443/client/login?request_locale=fr
by other side, if change type of rule "redirect" works, browser address show "ugly" forwarded url.
it's strange other custom interceptor use manage user session it's called always.
update:
i put log trace in action write locale session:
public string loadclientlogin() { logger.debug("locale: " + actioncontext.getcontext().getlocale()); return action.success; }
when call directly action, log shows correct locale code:
locale: fr
but through url rewriter this:
locale: [ljava.lang.string;@4d227ffb
any suggestion appreciated.
Comments
Post a Comment