You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "jade Lindquist (JIRA)" <ji...@apache.org> on 2017/06/14 19:52:00 UTC

[jira] [Commented] (WW-4803) OGNL not working with camel case and reverting to 3.0.6 isn't working

    [ https://issues.apache.org/jira/browse/WW-4803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16049585#comment-16049585 ] 

jade Lindquist commented on WW-4803:
------------------------------------

Also, bug WW 4616 said that OGNL is implementing the JavaBeans spec. The only capitalization rule I could find in the spec is the following which seems to support camel case unless the first TWO letters of the variable are upper case but xAxis only has one upper case character.

Perhaps you can post the part of the spec that the OGNL is implementing. This is what I've found:

8.8 Capitalization of inferred names.
When we use design patterns to infer a property or event name, we need to decide what rules
to follow for capitalizing the inferred name. If we extract the name from the middle of a normal
mixedCase style Java name then the name will, by default, begin with a capital letter.

Java programmers are accustomed to having normal identifiers start with lower case letters.
Vigorous reviewer input has convinced us that we should follow this same conventional rule
for property and event names.

Thus when we extract a property or event name from the middle of an existing Java name, we
normally convert the first character to lower case. However to support the occasional use of all
upper-case names, we check if the* first two characters* of the name are both upper case and if
so leave it alone. So for example,
“FooBah” becomes “fooBah”
“Z” becomes “z”
“URL” becomes “URL”
We provide a method Introspector.decapitalize which implements this conversion rule.


> OGNL not working with camel case and reverting to 3.0.6 isn't working
> ---------------------------------------------------------------------
>
>                 Key: WW-4803
>                 URL: https://issues.apache.org/jira/browse/WW-4803
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.3.32
>            Reporter: jade Lindquist
>
> After upgrading to Struts 2.3.32, actions with request parameters in camel case such as xAxis and yAxis broke. Reverting to ognl-3.0.6.jar was recommended in bug WW-4616 but it doesn't work because it throws this error:
> SEVERE: Exception starting filter struts2
> java.lang.NoSuchMethodError: ognl.SimpleNode.isSequence(Lognl/OgnlContext;)
> 		at com.opensymphony.xwork2.ognl.OgnlUtil.isEvalExpression(OgnlUtil.java:310)
> We still have lots of struts 1 code so we can't upgrade to struts 2.5. I also tried using the ognl-3.1.12.jar from struts 2.5 but the camel case error is still there.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)