we want to know that what is the use of
Explain the use of <logic:iterate>tag in struts application?
Hi
we want to know that what is the use oftag in struts application
we want to know that what is the use of
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Jun 4, 2012, 7:07 AM
Thetag is utilized for repeating the nested body content over a collection. Every element / object in a specified collection – which must be any one of – Iterator, Collection and Map or even an array – and their contents are nested in this tag.
- As a runtime expression that is specified as a value of the 'collection' attribute
- As a JSP bean that is specified by the 'name' attribute
- As the property that is specified by the 'property' of the JSP bean specified by the 'name' attribute.
Usually, every object that is exposed by the iterate tag is an object of the underlying collection that is to iterate over. In case a Map is to iterate, the exposed object should be of the type Map.Entry, which has two properties – i) key – the key under which the object / element is stored in a Map – ii) value – the value of corresponding key.
The following example depicts the usage of Hashtable that is to iterate:
Next account no is
Refer
http://www.mkyong.com/struts/struts-logic-iterate-example/
Thanks