i have list of values(e.g 100).
using logic:iterate, how can i print the multiples of 5th
element?
how the logic:iterate will understand the multiples of 5.

Answer Posted / murali krishna yella

ya.. this will surely work fine

<logic:iterate id="item" name="listName" scope="request"
indexId="index">
<%
if( (index%5)==0 ){
<bean:write name="item"/>
}
%>
</logic:iterate>

Is This Answer Correct ?    22 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to override the default error message that can come during file uploading process?

562


What is the purpose of @beforeresult?

597


What is the purpose of @customvalidator annotation?

563


What is token used for?

501


How can we handle exceptions thrown by application in Struts2?

526






What are the sections into which a strut configuration file can be divided?

544


Do you need an alignment after replacing struts?

511


What inbuilt themes are provided by struts2?

581


How we can controlled duplicate form submission in struts?

509


What is spring and struts in java?

500


What is the design role played by struts?

540


What do you mean by actionmapping?

521


What are the conditions for actionform to work correctly?

513


Why are springs better than struts?

597


What is ognl?

589