Hi,
I am having a method in my
jsp which is supposed to return arraylist values like mentioned below.
EURUSD ,1.3231,1.3231, 8/9/2010 , 1:18pm
EURAUD ,1.4436,1.444, 8/9/2010 , 1:18pm
NZDAUD ,0.7954,0.7965, 8/9/2010 , 1:18pm .
When i try to print the returned values, the final value alone printed like
NZDAUD ,0.7954,0.7965, 8/9/2010 , 1:18pm
From
java ranch forum's previous threads I read similar issue that,
[Post New]posted 19 March 2003 03:59
As I suspected, you only had 1 instance of object
that you keep re-set() your attribute. That's why you get the last data evertime.
What you might want to do is move the book info into separate object, let say Book which has the firstname, lastname, title, price, etc.
And your original object to contains a Collection
of Book, like ArrayList.
From an old
thread.. My issue is similar as expalined above that I am able to print only final line of arraylist.. How can i print all lines. In jsp I am using only method not using any class. So how can I create object (like Book as above example). Can anyone help me out in this issue..
Thanks and Regards,
Ramesh.