Apache Struts 2.3.35 Upgrade - backward incompatibility in s:if

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Apache Struts 2.3.35 Upgrade - backward incompatibility in s:if

Miguel Almeida
We upgraded from 2.3.34 to 2.3.35 in one of our applications, but although
the upgrade is described as backwards compatible, we found a problem in the
UI.

The simplified example is as follows.
*Given* a JSP with:

<s:if test="#scopeValues.contains('Portuguese Things')">
                    foo<s:property value="#scopeValues"/>
</s:if>
<s:else>
                     bar<s:property value="#scopeValues"/>
</s:else>

*And *scopesValues was previously set (<s:set var="scopeValues"
value="scopes"></s:set>, where scopes is a List<String>scopes in the action)

*When* the List<String> scopes has [Portuguese Things, XXX]
*Then *the JSP will print: bar[Portuguese Things, XXX]


If I revert to 2.3.34:
*Then *the JSP will print: foo[Portuguese Things, XXX]


What could be causing this? Since this breaks one of our pages we are now
hesitant on what other places could break after the upgrade.

Kind regards,

Miguel
Reply | Threaded
Open this post in threaded view
|

Re: Apache Struts 2.3.35 Upgrade - backward incompatibility in s:if

Bernd Eckenfels
Hello Miguel,

you Need to ask the Apache Struts Project (https://struts.apache.org/mail.html) instead.

Gruss
Bernd

--
http://bernd.eckenfels.net

Von: Miguel Almeida
Gesendet: Mittwoch, 29. August 2018 18:58
An: Maven Users List
Betreff: Apache Struts 2.3.35 Upgrade - backward incompatibility in s:if

We upgraded from 2.3.34 to 2.3.35 in one of our applications, but although
the upgrade is described as backwards compatible, we found a problem in the
UI.

The simplified example is as follows.
*Given* a JSP with:

<s:if test="#scopeValues.contains('Portuguese Things')">
                    foo<s:property value="#scopeValues"/>
</s:if>
<s:else>
                     bar<s:property value="#scopeValues"/>
</s:else>

*And *scopesValues was previously set (<s:set var="scopeValues"
value="scopes"></s:set>, where scopes is a List<String>scopes in the action)

*When* the List<String> scopes has [Portuguese Things, XXX]
*Then *the JSP will print: bar[Portuguese Things, XXX]


If I revert to 2.3.34:
*Then *the JSP will print: foo[Portuguese Things, XXX]


What could be causing this? Since this breaks one of our pages we are now
hesitant on what other places could break after the upgrade.

Kind regards,

Miguel