The problem of using Carousel Graph in jsp

The

carousel graph uses bootstrap"s rotation, which uses class= "active" to determine which picture to play
, but I use the tag c:foreach in jsp to traverse

so that every item is marked as active, cannot be rotated. If you don"t write active, every item is not marked as active, at all. How to write code to make it work properly?

Mar.16,2021
Menu