public class A {
public ArrayList getMyArray() {
//...
}
//...
}
(The worst case is you have this instance method calling your static method.)
In JSP,
<logic:iterate id="listID" name="keyA" property="myArray">
At 01:29 pm 24-10-2001 -0500, you wrote:
I'd like to retrieve an ArrayList from a public static method (getMyArray)
in class A to iterate through this ArrayList in my jsp. An instance of this
class A is saved in session scope after successful login.
in class A:
public static ArrayList getMyArray(A a)
{
// the Arraylist will contain B objects
...
}
I don't know how to code the bean:define to get this ArrayList out. I can
get the instance of A with this:
<bean:define id="myA" name="keyA" type="com.mycompany.A" scope="session" />
<bean:define id="myArray" name="myA" ???? type="java.util.ArrayList" />
<logic:iterate id="listID" name="myArray" type="com.mycompany.B" >
...
</logic:iterate>
Please help. Thanks for your time.
Thinh
John Yu Scioworks Technologies
e: [EMAIL PROTECTED] w: +(65) 873 5989
w: http://www.scioworks.com m: +(65) 9782 9610
Scioworks Camino - "Rapid WebApp Assembly for Struts"