Issue Details (XML | Word | Printable)

Key: DISPL-166
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Blocker Blocker
Reporter: Olaru Cristian
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DisplayTag

support for struts session locale

Created: 05/Jan/05 04:52 AM   Updated: 27/May/05 10:29 AM   Resolved: 05/Jan/05 10:39 AM
Return to search
Component/s: I18N
Affects Version/s: 1.0 RC2
Fix Version/s: 1.0

Time Tracking:
Not Specified

Issue Links:
dependent
 


 Description  « Hide
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?

fabrizio giustina added a comment - 05/Jan/05 10:38 AM
see issue DISPL-149
You 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)

fabrizio giustina made changes - 05/Jan/05 10:38 AM
Field Original Value New Value
Link This issue depends upon DISPL-149 [ DISPL-149 ]
fabrizio giustina made changes - 05/Jan/05 10:39 AM
Affects Version/s 1.0 RC2 [ 11221 ]
Affects Version/s 1.1 [ 11225 ]
fabrizio giustina made changes - 05/Jan/05 10:39 AM
Fix Version/s 1.0 [ 11222 ]
Resolution Duplicate [ 3 ]
Assignee fabrizio giustina [ fgiust ]
Status Open [ 1 ] Closed [ 6 ]