<Div> <DivID= "Mycarousel"class= "Carousel Slide"> <!--Carousel (Carousel) Indicator - <olclass= "Carousel-indicators"style= "bottom:0;"> <C:foreachItems= "${advertlist}"var= "advert"Varstatus= "Advert1"> <c:ifTest= "${advert1.index = = 0}"> <LiData-target= "#myCarousel"data-slide-to= "${advert1.index}"class= "Active"></Li> </c:if> <c:ifTest= "${advert1.index! = 0}"> <LiData-target= "#myCarousel"data-slide-to= "${advert1.index}"></Li> </c:if> </C:foreach> </ol> <!--Carousel (Carousel) Project - <Divclass= "Carousel-inner"> <C:foreachItems= "${advertlist}"var= "advert"Varstatus= "Advert1"> <c:ifTest= "${advert1.index = = 0}"> <Divclass= "Item Active"> <imgstyle= "width:100%;height:350px"src= "${advert.image}"alt= "First Slide"> </Div> </c:if> <c:ifTest= "${advert1.index! = 0}"> <Divclass= "Item"> <imgstyle= "width:100%;height:350px"src= "${advert.image}"alt= "Second Slide"> </Div> </c:if> </C:foreach> </Div> <!--Carousel (Carousel) Navigation - <aclass= "Carousel-control Left"href= "#myCarousel"Data-slide= "Prev">‹ </a> <aclass= "Carousel-control Right"href= "#myCarousel"Data-slide= "Next">› </a> </Div></Div>
Controller
@RequestMapping (value = "Homepage") public String homepage (model model) { // Get AD object list<cmsadvert> advertlist = cmsadvertservice.findlist (new Cmsadvert () ); Model.addattribute ("Advertlist", advertlist); return "Modules/cms/show/homepage"; }
Background Database Value Carousel Map