[
https://issues.apache.org/jira/browse/WW-4810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16074767#comment-16074767
]
Markus Fischer commented on WW-4810:
------------------------------------
I already tested this:
{{<s:property value="#request.locale.language"/>}} prints the appropriate
language code, and '' (empty / no value) for {{request_locale=}}. This sounds
logically, but seems to be a different beaviour from 2.5.10.
What is the output for {{<s:property value="#request.locale.language"/>}} and
{{request_locale=}} in your setup?
Do debug this issue in 2.5.10, I'd need to revert some changes. But I still
have the application online running, which shows a highligted EN element for
{{request_locale=}}. So {{<s:if test='#request.locale.language=="en"'>}} seems
to evaluate to {{true}} for {{request_locale=}}.
In Any case it's easy to work around...
> Calling empty locale
> --------------------
>
> Key: WW-4810
> URL: https://issues.apache.org/jira/browse/WW-4810
> Project: Struts 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.5.11
> Reporter: Markus Fischer
> Priority: Minor
> Fix For: 2.5.12
>
>
> < 2.5.11 calling empty locale {{?request_locale=}} results in locale {{en}}
> In 2.5.11 calling empty locale {{?request_locale=}} results in locale object
> (not null) with property {{languageTag}} set to {{null}} and as {{language}}
> == {{empty}}
> NB: it is also interesting to see the different behaviours for
> {code}
> wget --header="Accept-Language: fff" --no-check-certificate
> https://localhost:8443/myProject/path
> {code}
> {code}
> "Accept-Language: ff" => Fula language
> "Accept-Language: fff" => empty locale
> "Accept-Language: ffff" => exception thrown
> {code}
> This seems to be the standard behaviour of Locale though.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)