Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Struts
« Previous
Next »
Which of the logic tags is used for repetitive output generation?
Options
- < logic:lessThan>
- < login:redirect>
- < logic:iterate>
- < logic:loop>
CORRECT ANSWER : < logic:iterate>
Discussion Board
logic:iterate
logic:iterate is used for repetitive output generation as it repeats the nested body content of this tag over a specified collection. It repeats content of this tag once for every element of the specified collection, which must be an Iterator, a Collection, a Map (whose values are to be iterated over), or an array. There are following ways through which collections can be iterated:
1) As a runtime expression specified as the value of the collection attribute.
2) As a JSP bean specified by the name attribute.
3) As the property, specified by the property, of the JSP bean specified by the name attribute.
Example:
>logic:iterate id="element" name="myhashtable"<
Next element is >bean:write name="element" property="value"/<
>/logic:iterate<
Rohit Sharma 10-15-2014 03:32 PM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Java Beginner (11)
Java (39)
Java (40)
Java (22)
Java (30)
Java (25)
Java (20)
Java (20)
Core Java (20)
Core Java (10)
Core Java (72)
EJB (20)
JDBC (20)
Applet (20)
Struts (21)
Servlets (20)
Java Web Services (20)
Javascript (40)
J2EE (10)
jQuery (46)
Advertisement
▲