Increment counter with loop

前端 未结 4 419
梦毁少年i
梦毁少年i 2021-01-30 08:21

This question is related to my previous question :

Jsp iterate trough object list

I want to insert counter that starts from 0 in my for loop, I\'ve tried several

4条回答
  •  遥遥无期
    2021-01-30 09:05

    what led me to this page is that I set within a page then the inside of an included page I did the increment

    and here is the problem

    so to solve such a problem, simply use scope="request" when you declare the variable or the increment

    //when you set the variale add scope="request"
    
    //the increment, it can be happened inside an included page
    
    

    hope this saves your time

提交回复
热议问题