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

Explain the difference between dispatchaction and lookupdispatchaction in struts?

0 Answers  


Which configuration files are used in struts?

0 Answers  


what is the difference between page and pageContext implicit variables

2 Answers   Yash Technologies,


What is struts framework?

0 Answers  


What is the default location of result pages and how can we change it?

0 Answers  


Can explain about the validations and in your project where did u used the validations?

4 Answers   NIIT,


Can you explain struts.properties in struts2?

0 Answers  


What is role of actionservlet?

0 Answers  


What’s the utilization of struts.xml configuration file?

0 Answers  


how to create a search field in struts.with code

3 Answers   Infosys, Satyam,


wahts the diif between Mvc1 and Mvc2?

3 Answers   Wipro,


In Struts Programming which is the controller,which is the model?

10 Answers  


Categories