DisplayTag

support for struts session locale

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Duplicate
  • Affects Version/s: 1.0 RC2
  • Fix Version/s: 1.0
  • Component/s: I18N
  • Labels:
    None

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?

Issue Links

Activity

Hide
fabrizio giustina added a comment -
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)
Show
fabrizio giustina added a comment - 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)
Hide
Anonymous added a comment -
http://www.sneerzine.com/ <a href="http://www.sneerzine.com/">biloxi casinos</a> thanks
Show
Anonymous added a comment - http://www.sneerzine.com/ <a href="http://www.sneerzine.com/">biloxi casinos</a> thanks
Hide
Anonymous added a comment -
http://www.mylosoft.com/ <a href="http://www.mylosoft.com/">world series of poker</a> thanks for your site
Show
Anonymous added a comment - http://www.mylosoft.com/ <a href="http://www.mylosoft.com/">world series of poker</a> thanks for your site

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: