Hi,

Have a look at the following

In your action class have the following

String[] myarray = new String[5];
             
             myarray[0]="test0";
             myarray[1]="test1";
             myarray[2]="test2";
             myarray[3]="test";
            
             session.setAttribute("testArray",myarray);

in your jsp have the following

<s:iterator value="#session.testArray" id="testarr">
  Value of the arry is
  <s:property value="#testarr"/>
  <br>
 </s:iterator>


What it prints is following

Value of the arry is test0
Value of the arry is test1
Value of the arry is test2
Value of the arry is test
Value of the arry is test 

Last element also it prints 'test', This bug is not only for the last
elements it can be anywhere for example if you ignore  myarray[2]="test2";
then in the jsp for the 2 nd index it prints value of the 1st index,

Waiting for a quick fix,

Thanks



-- 
View this message in context: 
http://www.nabble.com/BUG-found-in-Iterator-tf4009642.html#a11387033
Sent from the Struts - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to