users
[Top] [All Lists]

RE: [cinjug-users] Struts 1.0.2 problem JDK1.3 vs JDK1.4

To: "Jeykumar, Nattamai S. (LNG-DAY)" <nattamai.jeykumar@xxxxxxxxxxxxxx>
Subject: RE: [cinjug-users] Struts 1.0.2 problem JDK1.3 vs JDK1.4
From: Creighton Kirkendall <ckirkendall@xxxxxxxxxxxxxx>
Date: Thu, 15 Apr 2004 14:52:55 -0400
Cc: users@xxxxxxxxxx
Delivered-to: mailing list users@cinjug.org
In-reply-to: <3DEFEE28EDC3DE4E8E9829D0060D6C230AD0B4B1@lnxdayexch10b.lexis-nexis.com>
Mailing-list: contact users-help@cinjug.org; run by ezmlm
References: <3DEFEE28EDC3DE4E8E9829D0060D6C230AD0B4B1@lnxdayexch10b.lexis-nexis.com>
An ArrayList

On Thu, 2004-04-15 at 14:41, Jeykumar, Nattamai S. (LNG-DAY) wrote:
> Is "locations" an Array or ArrayList ?
>  
>  
>  
> Thanks,
> Jey Kumar
> 
>         -----Original Message-----
>         From: Creighton Kirkendall [mailto:ckirkendall@xxxxxxxxxxxxxx]
>         Sent: Thursday, April 15, 2004 2:36 PM
>         To: users@xxxxxxxxxx
>         Subject: [cinjug-users] Struts 1.0.2 problem JDK1.3 vs JDK1.4
>         
>         
>         I have another weird problem for you guys.
>         
>         I am running Struts 1.0.2
>         
>         I have an action form developed outside of our company that
>         uses an ArrayList as a property in form.  This property is
>         called locations.  They have a getter and a setter for the
>         property.  This array list has an object in it that has
>         boolean flag of active.
>         
>         In the JSP they reference this property for a checkbox like
>         so.
>         
>         
>         <html:checkbox name="computersForm" property='<%=
>         "locations["+i +"].active" %>' /> 
>         
>         Now comes the weird part this works fine in jdk1.3 but fails
>         under 1.4. Struts is failing on a call to
>         object.getClass().isArray().  But does not fail on this call
>         in 1.3.  I am lost as to what the true problem is.  
>         
>         Here is the stack trace 
>         
>         
>         java.lang.IllegalArgumentException: Property 'locations' is
>         not indexed
>                 at
>         
> org.apache.struts.util.PropertyUtils.getIndexedProperty(PropertyUtils.ja
>         va(Inlined Compiled Code))
>                 at
>         
> org.apache.struts.util.PropertyUtils.getIndexedProperty(PropertyUtils.ja
>         va(Inlined Compiled Code))
>                 at
>         
> org.apache.struts.util.PropertyUtils.getNestedProperty(PropertyUtils.jav
>         a(Compiled Code))
>                 at
>         org.apache.struts.util.BeanUtils.getNestedProperty(BeanUtils.java:297)
>                 at
>         org.apache.struts.util.BeanUtils.getProperty(BeanUtils.java:322)
>                 at
>         
> org.apache.struts.taglib.html.CheckboxTag.doStartTag(CheckboxTag.java:20
>         7)
>         
>         Note: the form is in the session scope and it locations does
>         have a getter and a setter that return an ArrayList.
>         
>         
>         Creighton Kirkendall 


<Prev in Thread] Current Thread [Next in Thread>