Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5308410666 for ; Tue, 24 Sep 2013 05:38:16 +0000 (UTC) Received: (qmail 3225 invoked by uid 500); 24 Sep 2013 05:38:11 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 3165 invoked by uid 500); 24 Sep 2013 05:38:09 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 3150 invoked by uid 99); 24 Sep 2013 05:38:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Sep 2013 05:38:04 +0000 Date: Tue, 24 Sep 2013 05:38:04 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-3909) Not set parameter value to Action correctlly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-3909?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1377600= 6#comment-13776006 ]=20 Lukasz Lenart commented on WW-3909: ----------------------------------- Pull request https://github.com/jkuhnert/ognl/pull/6 =20 > Not set parameter value to Action correctlly=20 > --------------------------------------------- > > Key: WW-3909 > URL: https://issues.apache.org/jira/browse/WW-3909 > Project: Struts 2 > Issue Type: Bug > Components: Core Actions > Affects Versions: 2.3.4.1, 2.3.7 > Environment: JDK: 1.6.0_37 > AS: Tomcat 7.0.22 > Reporter: lwen.ma > Priority: Minor > Fix For: 2.3.16 > > Attachments: OgnlRuntime.patch > > > Sample code: > {code:java} > import com.opensymphony.xwork2.ActionSupport; > public class HelloAction extends ActionSupport { > private String pName; > public String execute() { > return SUCCESS; > } > public String getpName() { > return pName; > } > public void setpName(String pName) { > this.pName =3D pName; > } > } > {code} > I can't set param's value use url '{contextPath}/hello.action?pName=3D111= '. > According to JavaBeans Spec sec 8.8 "Capitalization of inferred names": > Thus when we extract a property or event name from the middle of an exist= ing Java name, we normally convert the first character to lower case. Howev= er to support the occasional use of all upper-case names, we check if the f= irst two characters of the name are both upper case and if so leave it alon= e. So for example, > =E2=80=9CFooBah=E2=80=9D becomes =E2=80=9CfooBah=E2=80=9D > =E2=80=9CZ=E2=80=9D becomes =E2=80=9Cz=E2=80=9D > =E2=80=9CURL=E2=80=9D becomes =E2=80=9CURL=E2=80=9D > We provide a method Introspector.decapitalize which implements this conve= rsion rule. > String java.beans.Introspector.decapitalize(String name) > Utility method to take a string and convert it to normal Java variable na= me capitalization. This normally means converting the first character from = upper case to lower case, but in the (unusual) special case when there is m= ore than one character and both the first and second characters are upper c= ase, we leave it alone.=20 > Thus "FooBah" becomes "fooBah" and "X" becomes "x", but "URL" stays as "U= RL". -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira