Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



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

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

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

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

Post New Answer

More Struts Interview Questions

What do you mean by the abstract package in struts2, and what is its utilization?

0 Answers  


What is the purpose of @typeconversion annotation annotation?

0 Answers  


how you implement and maintain your struts project by using MVC2 arch?

2 Answers   Patni, Wipro,


what are tiles in struts?

3 Answers   Wipro,


What is MVC Architecture?

21 Answers   HCL, Hexaware, Infosys, Infrascape, Tech Mahindra,


How many Action classes have been used in your project? Differences between struts 1.1 and 1.3?

0 Answers   Oracle,


wat happen when the connection is nt closed in jdbc n what vl happen when i interchange in executequery n execute statements

2 Answers  


What is controller in struts2?

0 Answers  


Is Struts Action class Thread Safe?

14 Answers   Wipro,


Mark the differences between html tags and strut specific html tags.

0 Answers  


what are the actions in struts?

10 Answers   Nihilent, Wipro,


What are the features of struts 2?

0 Answers  


Categories