You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Aleksandar Milošević (JIRA)" <ji...@apache.org> on 2009/03/16 10:33:02 UTC

[jira] Created: (WW-3038) com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale

com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale
--------------------------------------------------------------------------------------------------

                 Key: WW-3038
                 URL: https://issues.apache.org/struts/browse/WW-3038
             Project: Struts 2
          Issue Type: Bug
          Components: Core Actions
    Affects Versions: 2.1.6
         Environment: java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)

Linux aleksandar-laptop 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux

            Reporter: Aleksandar Milošević
         Attachments: main.action.2.0.14.html, main.action.2.1.6.html

This affects some tags and ognl 'getText()'. They wil not translate according to users locale.

<b>using key attribute</b> : <s:submit key="my.key" theme="simple"/><br/>

<b>using &lt;s:text/&gt;</b> : <s:text name="my.key" /><br/>

<b>using OGNL getText()</b> : <s:property value="getText('my.key')"/><br/>

This will display correctly on 2.0.14, but not on 2.1.6. On 2.1.6 it will mix translations from default and selected locale. Rendered html with <s:debug/> is attached for 2.0.14 and 2.1.6.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-3038) com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale

Posted by "Aleksandar Milošević (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksandar Milošević updated WW-3038:
-------------------------------------

    Assignee: Aleksandar Milošević
    Priority: Trivial  (was: Major)

This is web.xml configuration issue. Problem appears when deprecated filters are used. Like in 2.0.x configurations

    <filter>
        <filter-name>struts-cleanup</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
    </filter>
    <filter>
        <filter-name>struts</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>

Using org.apache.struts2.dispatcher.ng.filters.* displays proper results for struts 2.1.6.

http://struts.apache.org/2.x/docs/webxml.html



> com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-3038
>                 URL: https://issues.apache.org/struts/browse/WW-3038
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.6, 2.1.7
>         Environment: java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)
> Linux aleksandar-laptop 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux
>            Reporter: Aleksandar Milošević
>            Assignee: Aleksandar Milošević
>            Priority: Trivial
>         Attachments: main.action.2.0.14.html, main.action.2.1.6.html
>
>
> This affects some tags and ognl 'getText()'. They wil not translate according to users locale.
> <b>using key attribute</b> : <s:submit key="my.key" theme="simple"/><br/>
> <b>using &lt;s:text/&gt;</b> : <s:text name="my.key" /><br/>
> <b>using OGNL getText()</b> : <s:property value="getText('my.key')"/><br/>
> This will display correctly on 2.0.14, but not on 2.1.6. On 2.1.6 it will mix translations from default and selected locale. Rendered html with <s:debug/> is attached for 2.0.14 and 2.1.6.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work started: (WW-3038) com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale

Posted by "Aleksandar Milošević (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on WW-3038 started by Aleksandar Milošević.

> com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-3038
>                 URL: https://issues.apache.org/struts/browse/WW-3038
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.6, 2.1.7
>         Environment: java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)
> Linux aleksandar-laptop 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux
>            Reporter: Aleksandar Milošević
>            Assignee: Aleksandar Milošević
>            Priority: Trivial
>         Attachments: main.action.2.0.14.html, main.action.2.1.6.html
>
>
> This affects some tags and ognl 'getText()'. They wil not translate according to users locale.
> <b>using key attribute</b> : <s:submit key="my.key" theme="simple"/><br/>
> <b>using &lt;s:text/&gt;</b> : <s:text name="my.key" /><br/>
> <b>using OGNL getText()</b> : <s:property value="getText('my.key')"/><br/>
> This will display correctly on 2.0.14, but not on 2.1.6. On 2.1.6 it will mix translations from default and selected locale. Rendered html with <s:debug/> is attached for 2.0.14 and 2.1.6.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-3038) com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale

Posted by "David Mansfield (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45855#action_45855 ] 

David Mansfield commented on WW-3038:
-------------------------------------

i am hitting this too.  i have debugged to the point where I can confirm Horia Chiorean's analysis:  the locale is correctly set in the context, however the ParametersInterceptor clears this locally before setting parameters.

This, no parameters can be set that require locale, for example dates.

This is a critical regression.  No multi-locale applications requiring date conversion work since this "fix" was put into place.


> com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-3038
>                 URL: https://issues.apache.org/struts/browse/WW-3038
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.6, 2.1.7
>         Environment: java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)
> Linux aleksandar-laptop 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux
>            Reporter: Aleksandar Milošević
>         Attachments: main.action.2.0.14.html, main.action.2.1.6.html
>
>
> This affects some tags and ognl 'getText()'. They wil not translate according to users locale.
> <b>using key attribute</b> : <s:submit key="my.key" theme="simple"/><br/>
> <b>using &lt;s:text/&gt;</b> : <s:text name="my.key" /><br/>
> <b>using OGNL getText()</b> : <s:property value="getText('my.key')"/><br/>
> This will display correctly on 2.0.14, but not on 2.1.6. On 2.1.6 it will mix translations from default and selected locale. Rendered html with <s:debug/> is attached for 2.0.14 and 2.1.6.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-3038) com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale

Posted by "Aleksandar Milošević (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksandar Milošević updated WW-3038:
-------------------------------------

    Affects Version/s: 2.1.7

2.1.7 is also affected

> com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-3038
>                 URL: https://issues.apache.org/struts/browse/WW-3038
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.6, 2.1.7
>         Environment: java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)
> Linux aleksandar-laptop 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux
>            Reporter: Aleksandar Milošević
>         Attachments: main.action.2.0.14.html, main.action.2.1.6.html
>
>
> This affects some tags and ognl 'getText()'. They wil not translate according to users locale.
> <b>using key attribute</b> : <s:submit key="my.key" theme="simple"/><br/>
> <b>using &lt;s:text/&gt;</b> : <s:text name="my.key" /><br/>
> <b>using OGNL getText()</b> : <s:property value="getText('my.key')"/><br/>
> This will display correctly on 2.0.14, but not on 2.1.6. On 2.1.6 it will mix translations from default and selected locale. Rendered html with <s:debug/> is attached for 2.0.14 and 2.1.6.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WW-3038) com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale

Posted by "Aleksandar Milošević (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksandar Milošević reassigned WW-3038:
----------------------------------------

    Assignee:     (was: Aleksandar Milošević)

> com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-3038
>                 URL: https://issues.apache.org/struts/browse/WW-3038
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.6, 2.1.7
>         Environment: java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)
> Linux aleksandar-laptop 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux
>            Reporter: Aleksandar Milošević
>            Priority: Trivial
>         Attachments: main.action.2.0.14.html, main.action.2.1.6.html
>
>
> This affects some tags and ognl 'getText()'. They wil not translate according to users locale.
> <b>using key attribute</b> : <s:submit key="my.key" theme="simple"/><br/>
> <b>using &lt;s:text/&gt;</b> : <s:text name="my.key" /><br/>
> <b>using OGNL getText()</b> : <s:property value="getText('my.key')"/><br/>
> This will display correctly on 2.0.14, but not on 2.1.6. On 2.1.6 it will mix translations from default and selected locale. Rendered html with <s:debug/> is attached for 2.0.14 and 2.1.6.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-3038) com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale

Posted by "Aleksandar Milošević (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksandar Milošević updated WW-3038:
-------------------------------------

    Attachment: main.action.2.0.14.html
                main.action.2.1.6.html

rendered pages with <s:debug/>

> com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-3038
>                 URL: https://issues.apache.org/struts/browse/WW-3038
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.6
>         Environment: java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)
> Linux aleksandar-laptop 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux
>            Reporter: Aleksandar Milošević
>         Attachments: main.action.2.0.14.html, main.action.2.1.6.html
>
>
> This affects some tags and ognl 'getText()'. They wil not translate according to users locale.
> <b>using key attribute</b> : <s:submit key="my.key" theme="simple"/><br/>
> <b>using &lt;s:text/&gt;</b> : <s:text name="my.key" /><br/>
> <b>using OGNL getText()</b> : <s:property value="getText('my.key')"/><br/>
> This will display correctly on 2.0.14, but not on 2.1.6. On 2.1.6 it will mix translations from default and selected locale. Rendered html with <s:debug/> is attached for 2.0.14 and 2.1.6.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-3038) com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale

Posted by "Horia Chiorean (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45837#action_45837 ] 

Horia Chiorean commented on WW-3038:
------------------------------------

Not sure if the following causes the bug, but it seems that the ParametersInterceptor creates each time a new OgnlValueStack instance, ignoring *all* the context parameters from the original value stack.

This means that, if in the original stack context the Action's locale is correctly set, when the params interceptor applies the values, the locale is completely lost. Therefore during Ognl processing, the only locale left is the platform's default locale. This affects most of the locale-dependent processing which goes on in Ognl (incl. converters for example)

> com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-3038
>                 URL: https://issues.apache.org/struts/browse/WW-3038
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.6, 2.1.7
>         Environment: java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)
> Linux aleksandar-laptop 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux
>            Reporter: Aleksandar Milošević
>         Attachments: main.action.2.0.14.html, main.action.2.1.6.html
>
>
> This affects some tags and ognl 'getText()'. They wil not translate according to users locale.
> <b>using key attribute</b> : <s:submit key="my.key" theme="simple"/><br/>
> <b>using &lt;s:text/&gt;</b> : <s:text name="my.key" /><br/>
> <b>using OGNL getText()</b> : <s:property value="getText('my.key')"/><br/>
> This will display correctly on 2.0.14, but not on 2.1.6. On 2.1.6 it will mix translations from default and selected locale. Rendered html with <s:debug/> is attached for 2.0.14 and 2.1.6.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work stopped: (WW-3038) com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale

Posted by "Aleksandar Milošević (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on WW-3038 stopped by Aleksandar Milošević.

> com.opensymphony.xwork2.ActionSupport's locale property is always set to platform's default locale
> --------------------------------------------------------------------------------------------------
>
>                 Key: WW-3038
>                 URL: https://issues.apache.org/struts/browse/WW-3038
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.6, 2.1.7
>         Environment: java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
> Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)
> Linux aleksandar-laptop 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux
>            Reporter: Aleksandar Milošević
>            Assignee: Aleksandar Milošević
>            Priority: Trivial
>         Attachments: main.action.2.0.14.html, main.action.2.1.6.html
>
>
> This affects some tags and ognl 'getText()'. They wil not translate according to users locale.
> <b>using key attribute</b> : <s:submit key="my.key" theme="simple"/><br/>
> <b>using &lt;s:text/&gt;</b> : <s:text name="my.key" /><br/>
> <b>using OGNL getText()</b> : <s:property value="getText('my.key')"/><br/>
> This will display correctly on 2.0.14, but not on 2.1.6. On 2.1.6 it will mix translations from default and selected locale. Rendered html with <s:debug/> is attached for 2.0.14 and 2.1.6.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.