Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 82158 invoked from network); 26 Nov 2008 12:51:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Nov 2008 12:51:55 -0000 Received: (qmail 99668 invoked by uid 500); 26 Nov 2008 12:48:49 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 99640 invoked by uid 500); 26 Nov 2008 12:48:49 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 99614 invoked by uid 99); 26 Nov 2008 12:48:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Nov 2008 04:48:48 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.226.64.35] (HELO pro34.abac.com) (66.226.64.35) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Nov 2008 12:47:07 +0000 Received: from applied32 (138-187-91-219.static.youtele.com [219.91.187.138] (may be forged)) (authenticated bits=0) by pro34.abac.com (8.14.1/8.14.1) with ESMTP id mAQCkVBN016105 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Wed, 26 Nov 2008 04:46:35 -0800 (PST) (envelope-from rajil@appliedcommerce.com) From: "Rajil" To: Subject: Struts - indexed property problem with jdk1.5 - overloaded get/set method with same name - for Struts Team Date: Wed, 26 Nov 2008 18:16:29 +0530 Message-ID: <000001c94fc5$04414db0$200101c0@applied32> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C94FF3.1DF989B0" X-Mailer: Microsoft Office Outlook 11 Thread-Index: AclPxMS9pqUzPLKtTTG92geHv3A70g== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Spam-Score: 0.101 (HTML_MESSAGE) X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_0001_01C94FF3.1DF989B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello everyone; I am using jdk1.4, struts1.0 and tomcat4.1 for my application. And I wanted to upgrade my application to jdk1.5. Struts1.0 had some problem with jdk1.5. I was not able to interpret two property with the same name, one is indexed and other is not. E.g. I have one ActionForm namely BrokerList.java. . String brokerName; ArrayList brokers; // list of Broker Beans . And following get/set methods. Public String getBrokerName() . Public void setBrokerName(String brokerName) . Public String getBrokerName(int index) { Return ( (broker)Brokers.get(i) ).getBrokerName(); } Public String setBrokerName(int index, String brokerName) { ( (Broker)brokers.get(i) ).setBrokerName(brokerName); } You can imagine the code for JSP also. User is able to enter multiple brokers from single JSP. Now, this code was running fine under jdk1.4. But this code doesn't run under jdk1.5. This gets confused when it find 2 get/set methods with the same name. But they are actually different considering parameter "index". It's overloaded method. I solved this issue by writing my own org.apache.struts.util.PropertyUtils.java class to handle this situation. (from struts.jar) Can anybody tell me.. from what version of struts this issue is resolved??? Actually, I am on the way to upgrade my application to better version of struts where I don't have to change in-built classes. This issue can be better understood by Struts Team. If you don't understand my question let me know to explain more. Your help is appreciated. regards, Rajil Davda ------=_NextPart_000_0001_01C94FF3.1DF989B0--