I have always wanted to know the difference between JSTL c:forEach iteration tag and Struts logic:iterate tag. I have never needed to use struts logic iterate tag because c:forEach took care of my needs till now. Recently, I discovered a big difference between the two.

c:forEach does not throw any exception if you try to iterate over an object not set in the request but logic:iterate does. This is a big difference in terms of behavior.

Advertisements