code is like this:
<c:forEach items="${itemList}" var="item">
//do stuff based on the class type of item
</c:forEach>
Is it possible to do that? Thanks!
code is like this:
<c:forEach items="${itemList}" var="item">
//do stuff based on the class type of item
</c:forEach>
Is it possible to do that? Thanks!
Yes, ${item.class}
conforms to the javabeans convention, so you get the Class
. Then you can get other properties.
If it doesn't work, use ${item['class']}
© 2022 - 2024 — McMap. All rights reserved.