How to retrieve value from linkedhashmap using iterators in Struts2…?

前端 未结 2 608
南笙
南笙 2021-01-26 18:18

I have function which return LinkedHashMap in Struts2 and i just came to know that we cannot use for loop in struts2 instead we have to use Iterators, and am new to struts

2条回答
  •  我在风中等你
    2021-01-26 18:57

    You can use s:iterator over a map.

    
      : ,
    
    

    This iterates over the map using Map.Entry and then iterates over your value list using another iterator and iterator status to add "," unless it's the last entry.

提交回复
热议问题