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.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sharmila
You can try "indexId" param in the logic:iterate
It will give us the index value. So, inside the loop, you
can check if index value is multiple of 5 then only show the
record from the bean.
| Is This Answer Correct ? | 6 Yes | 5 No |
Difference between ActionErrors and ActionMessage?
Can we have multiple struts config files in a single web app?
What are the steps involved in creating a strut application?
What is the use of resourcebundle.properties file in Struts Validation framework?
whats is mean Actionerrors and Actionerror?
how you implement and maintain your struts project by using MVC2 arch?
What is the purpose of action tag in struts.xml?
1.can we transfer a request from one struts application to another struts application? 2. how many types of action servlets r there what r they
How do I access token?
How do you create message resource?
Name some useful annotations introduced in Struts2?
What is Struts Flow?