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 |
Explain the difference between dispatchaction and lookupdispatchaction in struts?
Which configuration files are used in struts?
what is the difference between page and pageContext implicit variables
What is struts framework?
What is the default location of result pages and how can we change it?
Can explain about the validations and in your project where did u used the validations?
Can you explain struts.properties in struts2?
What is role of actionservlet?
What’s the utilization of struts.xml configuration file?
how to create a search field in struts.with code
wahts the diif between Mvc1 and Mvc2?
In Struts Programming which is the controller,which is the model?