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 we can configured action mapping in struts?

581


What are the differences between http direct and http indirect?

472


How we can install struts?

558


What are disadvantages of Struts?

554


What is the use of token interceptor in Struts2?

620






How is token generated?

536


What does modeldriven interceptor?

593


Which file is used by controller to get mapping information for request routing?

538


What is the purpose of @element annotation annotation?

600


What are the steps used to setup dispatch action?

497


Why are struts tightly coupled?

593


What is the purpose of @element?

582


What is the use of Struts.xml configuration file?

518


What is interceptor struts2?

534


How do you convert struts to springs?

552