Details
Description
I want to use Struts session locale (not HTTP request). Strutt messages are internationalizated as struts locale. But display tag as request locale.
For this. I do this in display tag:
# locale provider (Jstl provider by default)
locale.provider=org.displaytag.localization.I18nStrutsAdapter
# locale.resolver (nothing by default, simply use locale from request)
locale.resolver=org.displaytag.localization.I18nStrutsAdapter
In my action I do this (loc is my localization for test):
//setLocale(request, loc);
HttpSession session = request.getSession(true);
session.setAttribute(Globals.LOCALE_KEY,loc);
This error is show:
[ServletException in:/templates/tiles/content/stocuri/listaComenzi.jsp] org.apache.struts.util.RequestUtils.getUserLocale(Ljavax/servlet/http/HttpServletRequest;Ljava/lang/String;)Ljava/util/Locale;'
Is some like display tag use a a spring method and ...
Why?
For this. I do this in display tag:
# locale provider (Jstl provider by default)
locale.provider=org.displaytag.localization.I18nStrutsAdapter
# locale.resolver (nothing by default, simply use locale from request)
locale.resolver=org.displaytag.localization.I18nStrutsAdapter
In my action I do this (loc is my localization for test):
//setLocale(request, loc);
HttpSession session = request.getSession(true);
session.setAttribute(Globals.LOCALE_KEY,loc);
This error is show:
[ServletException in:/templates/tiles/content/stocuri/listaComenzi.jsp] org.apache.struts.util.RequestUtils.getUserLocale(Ljavax/servlet/http/HttpServletRequest;Ljava/lang/String;)Ljava/util/Locale;'
Is some like display tag use a a spring method and ...
Why?
Issue Links
| This issue depends upon: | ||||
| DISPL-149 | I18StrutsAdapter requires struts 1.2 |
|
|
|
DISPL-149You are probably using displaytag 1.0 rc2, this has been fixed in 1.0. The struts adapter in displaytag rc2 required struts 1.2 (RequestUtils.getUserLocale() is from struts 1.2, not from Spring)
DISPL-149You are probably using displaytag 1.0 rc2, this has been fixed in 1.0. The struts adapter in displaytag rc2 required struts 1.2 (RequestUtils.getUserLocale() is from struts 1.2, not from Spring)